File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 10
10
11
11
import io
12
12
import os
13
+ import pathlib
13
14
14
15
import numpy as np
15
16
import pytest
@@ -291,7 +292,7 @@ def test_mgh_load_fileobj():
291
292
# pass the filename to the array proxy, please feel free to change this
292
293
# test.
293
294
img = MGHImage .load (MGZ_FNAME )
294
- assert img .dataobj .file_like == MGZ_FNAME
295
+ assert pathlib . Path ( img .dataobj .file_like ) == pathlib . Path ( MGZ_FNAME )
295
296
# Check fileobj also passed into dataobj
296
297
with ImageOpener (MGZ_FNAME ) as fobj :
297
298
contents = fobj .read ()
Original file line number Diff line number Diff line change 8
8
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
9
9
10
10
import os
11
+ import pathlib
11
12
import warnings
12
13
from unittest import TestCase
13
14
@@ -183,8 +184,8 @@ class TestEcatImage(TestCase):
183
184
img = image_class .load (example_file )
184
185
185
186
def test_file (self ):
186
- assert self .img .file_map ['header' ].filename == self .example_file
187
- assert self .img .file_map ['image' ].filename == self .example_file
187
+ assert pathlib . Path ( self .img .file_map ['header' ].filename ) == pathlib . Path ( self .example_file )
188
+ assert pathlib . Path ( self .img .file_map ['image' ].filename ) == pathlib . Path ( self .example_file )
188
189
189
190
def test_save (self ):
190
191
tmp_file = 'tinypet_tmp.v'
You can’t perform that action at this time.
0 commit comments