diff --git a/IPython/core/tests/test_display.py b/IPython/core/tests/test_display.py index 3d63a72..5fb3c2a 100644 --- a/IPython/core/tests/test_display.py +++ b/IPython/core/tests/test_display.py @@ -50,11 +50,8 @@ def test_image_filename_defaults(): embed=True) nt.assert_raises(ValueError, display.Image) nt.assert_raises(ValueError, display.Image, data='this is not an image', format='badformat', embed=True) - from IPython.html import DEFAULT_STATIC_FILES_PATH # check boths paths to allow packages to test at build and install time - imgfile = os.path.join(tpath, 'html/static/base/images/logo.png') - if not os.path.exists(imgfile): - imgfile = os.path.join(DEFAULT_STATIC_FILES_PATH, 'base/images/logo.png') + imgfile = os.path.join(tpath, 'core/tests/2x2.png') img = display.Image(filename=imgfile) nt.assert_equal('png', img.format) nt.assert_is_not_none(img._repr_png_()) diff --git a/IPython/core/tests/test_magic.py b/IPython/core/tests/test_magic.py index 101a006..c5dc30e 100644 --- a/IPython/core/tests/test_magic.py +++ b/IPython/core/tests/test_magic.py @@ -619,18 +619,16 @@ def test_extension(): tmpdir.cleanup() -# The nose skip decorator doesn't work on classes, so this uses unittest's skipIf -@skipIf(dec.module_not_available('IPython.nbformat'), 'nbformat not importable') -class NotebookExportMagicTests(TestCase): - def test_notebook_export_json(self): - _ip = get_ipython() - _ip.history_manager.reset() # Clear any existing history. - cmds = [u"a=1", u"def b():\n return a**2", u"print('noël, été', b())"] - for i, cmd in enumerate(cmds, start=1): - _ip.history_manager.store_inputs(i, cmd) - with TemporaryDirectory() as td: - outfile = os.path.join(td, "nb.ipynb") - _ip.magic("notebook -e %s" % outfile) +@dec.skip_without('jupyter_nbformat') +def test_notebook_export_json(): + _ip = get_ipython() + _ip.history_manager.reset() # Clear any existing history. + cmds = [u"a=1", u"def b():\n return a**2", u"print('noël, été', b())"] + for i, cmd in enumerate(cmds, start=1): + _ip.history_manager.store_inputs(i, cmd) + with TemporaryDirectory() as td: + outfile = os.path.join(td, "nb.ipynb") + _ip.magic("notebook -e %s" % outfile) class TestEnv(TestCase): diff --git a/IPython/core/tests/test_run.py b/IPython/core/tests/test_run.py index 267a8f3..a521f37 100644 --- a/IPython/core/tests/test_run.py +++ b/IPython/core/tests/test_run.py @@ -375,10 +375,10 @@ tclass.py: deleting object: C-third with tt.AssertNotPrints('SystemExit'): _ip.magic('run -e %s' % self.fname) - @dec.skip_without('IPython.nbformat') # Requires jsonschema + @dec.skip_without('jupyter_nbformat') # Requires jsonschema def test_run_nb(self): """Test %run notebook.ipynb""" - from IPython.nbformat import v4, writes + from jupyter_nbformat import v4, writes nb = v4.new_notebook( cells=[ v4.new_markdown_cell("The Ultimate Question of Everything"), diff --git a/IPython/terminal/tests/test_help.py b/IPython/terminal/tests/test_help.py index 262a375..0280f08 100644 --- a/IPython/terminal/tests/test_help.py +++ b/IPython/terminal/tests/test_help.py @@ -25,6 +25,6 @@ def test_locate_help(): def test_locate_profile_help(): tt.help_all_output_test("locate profile") -@skip_without('IPython.nbformat') # Requires jsonschema to be installed +@skip_without('jupyter_nbformat') # Requires jsonschema to be installed def test_trust_help(): tt.help_all_output_test("trust")