def test_00_extra_args(self):
     """Check that app complains about extra args."""
     for subcom in ('install', 'uninstall'):
         # sys.exit should be called if extra args specified
         with nt.assert_raises(SystemExit):
             main_app([subcom, 'arbitrary_extension_name'])
         for klass in app_classes:
             klass.clear_instance()
Exemple #2
0
 def test_00_extra_args(self):
     """Check that app complains about extra args."""
     for subcom in ('install', 'uninstall'):
         # sys.exit should be called if extra args specified
         with nt.assert_raises(SystemExit):
             main_app([subcom, 'arbitrary_extension_name'])
         for klass in app_classes:
             klass.clear_instance()
Exemple #3
0
 def test_01_help_output(self):
     """Check that app help works."""
     app_module = 'jupyter_contrib_nbextensions.application'
     for subcommand in (None, ['install'], ['uninstall']):
         check_help_output(app_module, subcommand=subcommand)
         check_help_all_output(app_module, subcommand=subcommand)
     # sys.exit should be called if empty argv specified
     with nt.assert_raises(SystemExit):
         main_app([])
 def test_01_help_output(self):
     """Check that app help works."""
     app_module = 'jupyter_contrib_nbextensions.application'
     for subcommand in (None, ['install'], ['uninstall']):
         check_help_output(app_module, subcommand=subcommand)
         check_help_all_output(app_module, subcommand=subcommand)
     # sys.exit should be called if empty argv specified
     with nt.assert_raises(SystemExit):
         main_app([])
 def _call_main_app(self, argv):
     main_app(argv=argv)
     # a bit of a hack to allow initializing a new app instance
     for klass in app_classes:
         klass.clear_instance()
Exemple #6
0
 def _call_main_app(self, argv):
     main_app(argv=argv)
     # a bit of a hack to allow initializing a new app instance
     for klass in app_classes:
         klass.clear_instance()