Commit 13349652 authored by Stefan Behnel's avatar Stefan Behnel

Avoid calling undefined name if IPython import fails.

parent bf442cd5
...@@ -13,6 +13,9 @@ try: ...@@ -13,6 +13,9 @@ try:
from IPython.utils import py3compat from IPython.utils import py3compat
except: except:
__test__ = False __test__ = False
ip = None
else:
ip = get_ipython()
try: try:
# disable IPython history thread to avoid having to clean it up # disable IPython history thread to avoid having to clean it up
...@@ -23,7 +26,6 @@ except ImportError: ...@@ -23,7 +26,6 @@ except ImportError:
from Cython.TestUtils import CythonTest from Cython.TestUtils import CythonTest
ip = get_ipython()
code = py3compat.str_to_unicode("""\ code = py3compat.str_to_unicode("""\
def f(x): def f(x):
return 2*x return 2*x
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment