File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -171,14 +171,14 @@ def test_assert_re_in(regex, entries):
171
171
172
172
173
173
def test_test_data ():
174
- assert str (test_data ()) == str (data_path )
174
+ assert str (test_data ()) == str (data_path ) # Always get the same result
175
+ # Works the same as using __file__ and os.path utilities
175
176
assert str (test_data ()) == os .path .abspath (
176
177
os .path .join (os .path .dirname (__file__ ), '..' , 'tests' , 'data' )
177
178
)
179
+ # Check action of subdir and that existence checks work
178
180
for subdir in ('nicom' , 'gifti' , 'externals' ):
179
- assert str (test_data (subdir )) == os .path .join (
180
- data_path .parent .parent , subdir , 'tests' , 'data'
181
- )
181
+ assert test_data (subdir ) == data_path .parent .parent / subdir / 'tests' / 'data'
182
182
assert os .path .exists (test_data (subdir ))
183
183
assert not os .path .exists (test_data (subdir , 'doesnotexist' ))
184
184
You can’t perform that action at this time.
0 commit comments