Show More
@@ -15,6 +15,12 b' import sys' | |||
|
15 | 15 | from StringIO import StringIO |
|
16 | 16 | from unittest import TestCase |
|
17 | 17 | |
|
18 | try: | |
|
19 | from importlib import invalidate_caches # Required from Python 3.3 | |
|
20 | except ImportError: | |
|
21 | def invalidate_caches(): | |
|
22 | pass | |
|
23 | ||
|
18 | 24 | import nose.tools as nt |
|
19 | 25 | |
|
20 | 26 | from IPython.core import magic |
@@ -449,6 +455,7 b' def test_extension():' | |||
|
449 | 455 | url = os.path.join(os.path.dirname(__file__), "daft_extension.py") |
|
450 | 456 | _ip.magic("install_ext %s" % url) |
|
451 | 457 | _ip.user_ns.pop('arq', None) |
|
458 | invalidate_caches() # Clear import caches | |
|
452 | 459 | _ip.magic("load_ext daft_extension") |
|
453 | 460 | tt.assert_equal(_ip.user_ns['arq'], 185) |
|
454 | 461 | _ip.magic("unload_ext daft_extension") |
General Comments 0
You need to be logged in to leave comments.
Login now