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 402e2f8 commit 18edfe3Copy full SHA for 18edfe3
nipype/utils/tests/test_misc.py
@@ -7,6 +7,7 @@
7
from builtins import next
8
9
import pytest
10
+import sys
11
12
from nipype.utils.misc import (container_to_string, getsource,
13
create_function_from_source, str2bool, flatten,
@@ -81,3 +82,11 @@ def test_flatten():
81
82
83
back = unflatten([], [])
84
assert back == []
85
+
86
+@pytest.mark.skipif(sys.version_info[0] > 2, reason="test unicode in functions")
87
+def test_func_py2():
88
+ def is_string():
89
+ return isinstance('string', str)
90
91
+ wrapped_func = create_function_from_source(getsource(is_string))
92
+ assert is_string() == wrapped_func()
0 commit comments