Show More
@@ -13,7 +13,7 b' import tempfile' | |||||
13 | import nose.tools as nt |
|
13 | import nose.tools as nt | |
14 |
|
14 | |||
15 | # our own packages |
|
15 | # our own packages | |
16 | from IPython import iplib |
|
16 | from IPython import ipapi, iplib | |
17 |
|
17 | |||
18 | #----------------------------------------------------------------------------- |
|
18 | #----------------------------------------------------------------------------- | |
19 | # Globals |
|
19 | # Globals | |
@@ -28,7 +28,15 b' from IPython import iplib' | |||||
28 | # ipapi instance should be read from there, but we also will often need to use |
|
28 | # ipapi instance should be read from there, but we also will often need to use | |
29 | # the actual IPython one. |
|
29 | # the actual IPython one. | |
30 |
|
30 | |||
31 | ip = _ip # This is the ipapi instance |
|
31 | # Get the public instance of IPython, and if it's None, make one so we can use | |
|
32 | # it for testing | |||
|
33 | ip = ipapi.get() | |||
|
34 | if ip is None: | |||
|
35 | # IPython not running yet, make one from the testing machinery for | |||
|
36 | # consistency when the test suite is being run via iptest | |||
|
37 | from IPython.testing.plugin import ipdoctest | |||
|
38 | ip = ipapi.get() | |||
|
39 | ||||
32 | IP = ip.IP # This is the actual IPython shell 'raw' object. |
|
40 | IP = ip.IP # This is the actual IPython shell 'raw' object. | |
33 |
|
41 | |||
34 | #----------------------------------------------------------------------------- |
|
42 | #----------------------------------------------------------------------------- |
General Comments 0
You need to be logged in to leave comments.
Login now