def test_nbextensionpy_uninstall_files(self): self._inject_mock_extension() install_nbextension_python('mockextension', user=True) uninstall_nbextension_python('mockextension', user=True) assert not check_nbextension('_mockdestination/index.js') assert not check_nbextension(['_mockdestination/index.js'])
def deactivate(self, sys_prefix=True, user=False): self.disable_serverextension_py('nbgrader', sys_prefix=sys_prefix, user=user) self.disable_serverextension_py('e2xgrader', sys_prefix=sys_prefix, user=user) self.install_nbextensions('nbgrader', sys_prefix=sys_prefix, user=user) self.install_nbextensions('e2xgrader', sys_prefix=sys_prefix, user=user) uninstall_nbextension_python(module='nbgrader', sys_prefix=sys_prefix, user=user) uninstall_nbextension_python(module='e2xgrader', sys_prefix=sys_prefix, user=user)
def start(self): """Perform the App's actions as configured.""" if self.extra_args: sys.exit('{} takes no extra arguments'.format(self.name)) else: if self._toggle_value: nbextensions.install_nbextension_python( _pkg_name, overwrite=True, symlink=False, user=self.user, sys_prefix=self.sys_prefix, prefix=None, nbextensions_dir=None, logger=None) else: nbextensions.uninstall_nbextension_python( _pkg_name, user=self.user, sys_prefix=self.sys_prefix, prefix=None, nbextensions_dir=None, logger=None) self.toggle_nbextension_python(_pkg_name) self.toggle_server_extension_python(_pkg_name)
def uninstall_nbextension(): disable_nbextension_python('iclientpy', sys_prefix=True) uninstall_nbextension_python('iclientpy', sys_prefix=True)