@@ -619,18 +619,16 @@ def test_extension():
619619 tmpdir .cleanup ()
620620
621621
622- # The nose skip decorator doesn't work on classes, so this uses unittest's skipIf
623- @skipIf (dec .module_not_available ('IPython.nbformat' ), 'nbformat not importable' )
624- class NotebookExportMagicTests (TestCase ):
625- def test_notebook_export_json (self ):
626- _ip = get_ipython ()
627- _ip .history_manager .reset () # Clear any existing history.
628- cmds = [u"a=1" , u"def b():\n return a**2" , u"print('noël, été', b())" ]
629- for i , cmd in enumerate (cmds , start = 1 ):
630- _ip .history_manager .store_inputs (i , cmd )
631- with TemporaryDirectory () as td :
632- outfile = os .path .join (td , "nb.ipynb" )
633- _ip .magic ("notebook -e %s" % outfile )
622+ @dec .skip_without ('jupyter_nbformat' )
623+ def test_notebook_export_json ():
624+ _ip = get_ipython ()
625+ _ip .history_manager .reset () # Clear any existing history.
626+ cmds = [u"a=1" , u"def b():\n return a**2" , u"print('noël, été', b())" ]
627+ for i , cmd in enumerate (cmds , start = 1 ):
628+ _ip .history_manager .store_inputs (i , cmd )
629+ with TemporaryDirectory () as td :
630+ outfile = os .path .join (td , "nb.ipynb" )
631+ _ip .magic ("notebook -e %s" % outfile )
634632
635633
636634class TestEnv (TestCase ):
0 commit comments