We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc73dd6 commit 9ceaf7fCopy full SHA for 9ceaf7f
nibabel/tests/test_openers.py
@@ -232,7 +232,11 @@ class StrictOpener(Opener):
232
if lext != ext: # extension should not be recognized -> file
233
assert_true(isinstance(fobj.fobj, file_class))
234
elif lext == 'gz':
235
- assert_true(isinstance(fobj.fobj, GzipFile))
+ try:
236
+ from indexed_gzip import IndexedGzipFile
237
+ except ImportError:
238
+ IndexedGzipFile = GzipFile
239
+ assert_true(isinstance(fobj.fobj, (GzipFile, IndexedGzipFile)))
240
else:
241
assert_true(isinstance(fobj.fobj, BZ2File))
242
0 commit comments