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 b7d2a19 commit 49e3272Copy full SHA for 49e3272
nipype/utils/tests/test_misc.py
@@ -5,7 +5,8 @@
5
6
from builtins import next
7
8
-from nipype.testing import assert_equal, assert_true, assert_false
+from nipype.testing import (assert_equal, assert_true, assert_false,
9
+ assert_raises)
10
11
from nipype.utils.misc import (container_to_string, getsource,
12
create_function_from_source, str2bool, flatten,
@@ -49,6 +50,9 @@ def func1(x):
49
50
f_recreated = create_function_from_source(f_src)
51
yield assert_equal, f(2.3), f_recreated(2.3)
52
53
+def test_func_to_str_err():
54
+ bad_src = "obbledygobbledygook"
55
+ yield assert_raises, RuntimeError, create_function_from_source, bad_src
56
57
def test_str2bool():
58
yield assert_true, str2bool("yes")
0 commit comments