From 1712cb08fcb7fc69d957918d149e90ab887b5b86 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 10 Oct 2024 09:03:16 -0400 Subject: [PATCH] TEST: Do not depend on test order in test_api_validators (#1377) --- nibabel/tests/test_api_validators.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nibabel/tests/test_api_validators.py b/nibabel/tests/test_api_validators.py index a4e787465..2388089f2 100644 --- a/nibabel/tests/test_api_validators.py +++ b/nibabel/tests/test_api_validators.py @@ -99,18 +99,18 @@ class TestRunAllTests(ValidateAPI): We check this in the module teardown function """ - run_tests = [] + run_tests = {} def obj_params(self): yield 1, 2 def validate_first(self, obj, param): - self.run_tests.append('first') + self.run_tests.add('first') def validate_second(self, obj, param): - self.run_tests.append('second') + self.run_tests.add('second') @classmethod def teardown_class(cls): # Check that both validate_xxx tests got run - assert cls.run_tests == ['first', 'second'] + assert cls.run_tests == {'first', 'second'}