示例#1
0
 def install_nbextensions(self, module, sys_prefix=True, user=False):
     install_nbextension_python(module=module,
                                sys_prefix=sys_prefix,
                                user=user,
                                overwrite=True)
     disable_nbextension_python(module=module,
                                sys_prefix=sys_prefix,
                                user=user)
 def test_nbextensionpy_disable(self):
     self._inject_mock_extension('notebook')
     install_nbextension_python('mockextension', user=True)
     enable_nbextension_python('mockextension')
     disable_nbextension_python('mockextension', user=True)
     
     config_dir = os.path.join(_get_config_dir(user=True), 'nbconfig')
     cm = BaseJSONConfigManager(config_dir=config_dir)
     enabled = cm.get('notebook').get('load_extensions', {}).get('_mockdestination/index', False)
     assert not enabled
 def test_nbextensionpy_disable(self):
     self._inject_mock_extension('notebook')
     install_nbextension_python('mockextension', user=True)
     enable_nbextension_python('mockextension')
     disable_nbextension_python('mockextension', user=True)
     
     config_dir = os.path.join(_get_config_dir(user=True), 'nbconfig')
     cm = BaseJSONConfigManager(config_dir=config_dir)
     enabled = cm.get('notebook').get('load_extensions', {}).get('_mockdestination/index', False)
     assert not enabled
示例#4
0
def uninstall_nbextension():
    disable_nbextension_python('iclientpy', sys_prefix=True)
    uninstall_nbextension_python('iclientpy', sys_prefix=True)