Show More
@@ -605,13 +605,10 b' def test_prun_quotes():' | |||||
605 | nt.assert_equal(_ip.user_ns['x'], '\t') |
|
605 | nt.assert_equal(_ip.user_ns['x'], '\t') | |
606 |
|
606 | |||
607 | def test_extension(): |
|
607 | def test_extension(): | |
608 | tmpdir = TemporaryDirectory() |
|
608 | nt.assert_raises(ImportError, _ip.magic, "load_ext daft_extension") | |
609 | orig_ipython_dir = _ip.ipython_dir |
|
609 | daft_path = os.path.join(os.path.dirname(__file__), "daft_extension") | |
|
610 | sys.path.insert(0, daft_path) | |||
610 | try: |
|
611 | try: | |
611 | _ip.ipython_dir = tmpdir.name |
|
|||
612 | nt.assert_raises(ImportError, _ip.magic, "load_ext daft_extension") |
|
|||
613 | url = os.path.join(os.path.dirname(__file__), "daft_extension") |
|
|||
614 | _ip.system("%s -m pip install %s" % (sys.executable, url)) |
|
|||
615 | _ip.user_ns.pop('arq', None) |
|
612 | _ip.user_ns.pop('arq', None) | |
616 | invalidate_caches() # Clear import caches |
|
613 | invalidate_caches() # Clear import caches | |
617 | _ip.magic("load_ext daft_extension") |
|
614 | _ip.magic("load_ext daft_extension") | |
@@ -619,8 +616,7 b' def test_extension():' | |||||
619 | _ip.magic("unload_ext daft_extension") |
|
616 | _ip.magic("unload_ext daft_extension") | |
620 | assert 'arq' not in _ip.user_ns |
|
617 | assert 'arq' not in _ip.user_ns | |
621 | finally: |
|
618 | finally: | |
622 | _ip.ipython_dir = orig_ipython_dir |
|
619 | sys.path.remove(daft_path) | |
623 | tmpdir.cleanup() |
|
|||
624 |
|
620 | |||
625 |
|
621 | |||
626 | @dec.skip_without('nbformat') |
|
622 | @dec.skip_without('nbformat') |
@@ -126,7 +126,7 b' def find_package_data():' | |||||
126 |
|
126 | |||
127 | package_data = { |
|
127 | package_data = { | |
128 | 'IPython.core' : ['profile/README*'], |
|
128 | 'IPython.core' : ['profile/README*'], | |
129 | 'IPython.core.tests' : ['*.png', '*.jpg'], |
|
129 | 'IPython.core.tests' : ['*.png', '*.jpg', 'daft_extension/*.py'], | |
130 | 'IPython.lib.tests' : ['*.wav'], |
|
130 | 'IPython.lib.tests' : ['*.wav'], | |
131 | 'IPython.testing.plugin' : ['*.txt'], |
|
131 | 'IPython.testing.plugin' : ['*.txt'], | |
132 | } |
|
132 | } |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now