Skip to content

Commit 1712cb0

Browse files
committed
TEST: Do not depend on test order in test_api_validators (#1377)
1 parent 249986b commit 1712cb0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nibabel/tests/test_api_validators.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,18 +99,18 @@ class TestRunAllTests(ValidateAPI):
9999
We check this in the module teardown function
100100
"""
101101

102-
run_tests = []
102+
run_tests = {}
103103

104104
def obj_params(self):
105105
yield 1, 2
106106

107107
def validate_first(self, obj, param):
108-
self.run_tests.append('first')
108+
self.run_tests.add('first')
109109

110110
def validate_second(self, obj, param):
111-
self.run_tests.append('second')
111+
self.run_tests.add('second')
112112

113113
@classmethod
114114
def teardown_class(cls):
115115
# Check that both validate_xxx tests got run
116-
assert cls.run_tests == ['first', 'second']
116+
assert cls.run_tests == {'first', 'second'}

0 commit comments

Comments
 (0)