File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change 2424
2525from itertools import zip_longest
2626
27- try :
28- from contextlib import nullcontext
29- except ImportError : # PY36
30- from contextlib import contextmanager
31- @contextmanager
32- def nullcontext ():
33- yield
27+ from contextlib import nullcontext
3428
3529
3630def test_data (subdir = None , fname = None ):
Original file line number Diff line number Diff line change @@ -36,8 +36,7 @@ def test_read_img_data():
3636 ]
3737 fnames_test += [pathlib .Path (p ) for p in fnames_test ]
3838 for fname in fnames_test :
39- # os.path.join doesn't work between str / os.PathLike in py3.5
40- fpath = pjoin (data_path , str (fname ))
39+ fpath = pjoin (data_path , fname )
4140 if isinstance (fname , pathlib .Path ):
4241 fpath = pathlib .Path (fpath )
4342 img = load (fpath )
@@ -56,8 +55,7 @@ def test_read_img_data():
5655 up_fpath = pjoin (tmpdir , str (fname ).upper ())
5756 if isinstance (fname , pathlib .Path ):
5857 up_fpath = pathlib .Path (up_fpath )
59- # shutil doesn't work with os.PathLike in py3.5
60- shutil .copyfile (str (fpath ), str (up_fpath ))
58+ shutil .copyfile (fpath , up_fpath )
6159 img = load (up_fpath )
6260 assert_array_equal (img .dataobj , data )
6361 del img
You can’t perform that action at this time.
0 commit comments