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):
171171
172172
173173def 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
175176 assert str (test_data ()) == os .path .abspath (
176177 os .path .join (os .path .dirname (__file__ ), '..' , 'tests' , 'data' )
177178 )
179+ # Check action of subdir and that existence checks work
178180 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'
182182 assert os .path .exists (test_data (subdir ))
183183 assert not os .path .exists (test_data (subdir , 'doesnotexist' ))
184184
You can’t perform that action at this time.
0 commit comments