##// END OF EJS Templates
Merge pull request #8978 from Carreau/untest-iex...
Min RK -
r21839:cf5086fa merge
parent child Browse files
Show More
@@ -0,0 +1,5 b''
1 from distutils.core import setup
2 setup(name='daft_extension',
3 version='1.0',
4 py_modules=['daft_extension'],
5 )
1 NO CONTENT: file renamed from IPython/core/tests/daft_extension.py to IPython/core/tests/daft_extension/daft_extension.py
NO CONTENT: file renamed from IPython/core/tests/daft_extension.py to IPython/core/tests/daft_extension/daft_extension.py
@@ -9,7 +9,7 b' import io'
9 import os
9 import os
10 import sys
10 import sys
11 import warnings
11 import warnings
12 from unittest import TestCase, skipIf
12 from unittest import TestCase
13
13
14 try:
14 try:
15 from importlib import invalidate_caches # Required from Python 3.3
15 from importlib import invalidate_caches # Required from Python 3.3
@@ -23,9 +23,8 b' from IPython import get_ipython'
23 from IPython.core import magic
23 from IPython.core import magic
24 from IPython.core.error import UsageError
24 from IPython.core.error import UsageError
25 from IPython.core.magic import (Magics, magics_class, line_magic,
25 from IPython.core.magic import (Magics, magics_class, line_magic,
26 cell_magic, line_cell_magic,
26 cell_magic,
27 register_line_magic, register_cell_magic,
27 register_line_magic, register_cell_magic)
28 register_line_cell_magic)
29 from IPython.core.magics import execution, script, code
28 from IPython.core.magics import execution, script, code
30 from IPython.testing import decorators as dec
29 from IPython.testing import decorators as dec
31 from IPython.testing import tools as tt
30 from IPython.testing import tools as tt
@@ -611,8 +610,8 b' def test_extension():'
611 try:
610 try:
612 _ip.ipython_dir = tmpdir.name
611 _ip.ipython_dir = tmpdir.name
613 nt.assert_raises(ImportError, _ip.magic, "load_ext daft_extension")
612 nt.assert_raises(ImportError, _ip.magic, "load_ext daft_extension")
614 url = os.path.join(os.path.dirname(__file__), "daft_extension.py")
613 url = os.path.join(os.path.dirname(__file__), "daft_extension")
615 _ip.magic("install_ext %s" % url)
614 _ip.system("%s -m pip install %s" % (sys.executable, url))
616 _ip.user_ns.pop('arq', None)
615 _ip.user_ns.pop('arq', None)
617 invalidate_caches() # Clear import caches
616 invalidate_caches() # Clear import caches
618 _ip.magic("load_ext daft_extension")
617 _ip.magic("load_ext daft_extension")
General Comments 0
You need to be logged in to leave comments. Login now