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 f5b92d2 commit 63ff5efCopy full SHA for 63ff5ef
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