projects
/
nipy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
951fdd6
)
BF: allow for generic IOError-based exception to be thrown when loading non existing...
author
Yaroslav Halchenko
<debian@onerussian.com>
Sat, 4 Nov 2017 03:07:42 +0000
(
03:07
+0000)
committer
Peter Michael Green
<plugwash@raspbian.org>
Sat, 4 Nov 2017 03:07:42 +0000
(
03:07
+0000)
Gbp-Pq: Name changeset_751531a2894e69383f75e6a9b97586e74759ab1b.diff
nipy/io/tests/test_image_io.py
patch
|
blob
|
history
diff --git
a/nipy/io/tests/test_image_io.py
b/nipy/io/tests/test_image_io.py
index 3bc1549e6da914669db25b1fbbe7af44eaa1ced3..fa8e2c615c5ebd230f9c6c8eac1a93fd22eb6e8d 100644
(file)
--- a/
nipy/io/tests/test_image_io.py
+++ b/
nipy/io/tests/test_image_io.py
@@
-41,7
+41,10
@@
def load_template_img():
def test_badfile():
filename = "bad_file.foo"
- assert_raises(ImageFileError, load_image, filename)
+ # nibabel prior 2.1.0 was throwing ImageFileError and then more specific
+ # FileNotFileNotFoundError which should be a subclass of IOError.
+ # To not mess with version specific imports, checking for IOError
+ assert_raises((ImageFileError, IOError), load_image, filename)
@if_templates