Skip to content

Commit

Permalink
Merge pull request #9059 from minrk/dont-install-daft-extension
Browse files Browse the repository at this point in the history
don't install test extension
  • Loading branch information
takluyver committed Dec 1, 2015
2 parents cf5086f + f72cfee commit 1d77f90
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
5 changes: 0 additions & 5 deletions IPython/core/tests/daft_extension/setup.py

This file was deleted.

12 changes: 4 additions & 8 deletions IPython/core/tests/test_magic.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,22 +605,18 @@ def test_prun_quotes():
nt.assert_equal(_ip.user_ns['x'], '\t')

def test_extension():
tmpdir = TemporaryDirectory()
orig_ipython_dir = _ip.ipython_dir
nt.assert_raises(ImportError, _ip.magic, "load_ext daft_extension")
daft_path = os.path.join(os.path.dirname(__file__), "daft_extension")
sys.path.insert(0, daft_path)
try:
_ip.ipython_dir = tmpdir.name
nt.assert_raises(ImportError, _ip.magic, "load_ext daft_extension")
url = os.path.join(os.path.dirname(__file__), "daft_extension")
_ip.system("%s -m pip install %s" % (sys.executable, url))
_ip.user_ns.pop('arq', None)
invalidate_caches() # Clear import caches
_ip.magic("load_ext daft_extension")
nt.assert_equal(_ip.user_ns['arq'], 185)
_ip.magic("unload_ext daft_extension")
assert 'arq' not in _ip.user_ns
finally:
_ip.ipython_dir = orig_ipython_dir
tmpdir.cleanup()
sys.path.remove(daft_path)


@dec.skip_without('nbformat')
Expand Down
2 changes: 1 addition & 1 deletion setupbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def find_package_data():

package_data = {
'IPython.core' : ['profile/README*'],
'IPython.core.tests' : ['*.png', '*.jpg'],
'IPython.core.tests' : ['*.png', '*.jpg', 'daft_extension/*.py'],
'IPython.lib.tests' : ['*.wav'],
'IPython.testing.plugin' : ['*.txt'],
}
Expand Down

0 comments on commit 1d77f90

Please sign in to comment.