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 8190044 commit 937cd9dCopy full SHA for 937cd9d
nibabel/tests/test_optpkg.py
@@ -38,7 +38,12 @@ def test_basic():
38
assert_good('os.path')
39
# We never have package _not_a_package
40
assert_bad('_not_a_package')
41
+
42
+ # setup_module imports nose, so make sure we don't disrupt that
43
+ orig_import = builtins.__import__
44
def raise_Exception(*args, **kwargs):
45
+ if args[0] == 'nose':
46
+ return orig_import(*args, **kwargs)
47
raise Exception(
48
"non ImportError could be thrown by some malfunctioning module "
49
"upon import, and optional_package should catch it too")
0 commit comments