Пример #1
0
    def test_nbextension_validate(self):
        # Break the metadata (correct file will still be copied)
        self._inject_mock_extension('notebook')

        install_nbextension_python('mockextension', user=True)
        enable_nbextension_python('mockextension')

        warnings = validate_nbextension("_mockdestination/index")
        self.assertEqual([], warnings, warnings)
Пример #2
0
    def test_nbextension_validate(self):
        # Break the metadata (correct file will still be copied)
        self._inject_mock_extension('notebook')

        install_nbextension_python('mockextension', user=True)
        enable_nbextension_python('mockextension')

        warnings = validate_nbextension("_mockdestination/index")
        self.assertEqual([], warnings, warnings)
Пример #3
0
 def test_nbextension_validate_bad(self):
     warnings = validate_nbextension("this-doesn't-exist")
     self.assertNotEqual([], warnings, warnings)
Пример #4
0
import sys

from notebook.nbextensions import validate_nbextension

if validate_nbextension('bqplot-image-gl/extension') != []:
    print("Issue detected with nbextension for bqplot-image-gl")
    sys.exit(1)
Пример #5
0
 def test_nbextension_validate_bad(self):
     warnings = validate_nbextension("this-doesn't-exist")
     self.assertNotEqual([], warnings, warnings)
Пример #6
0
import logging
import sys

from jupyterlab.commands import get_app_info
from notebook.nbextensions import validate_nbextension
from notebook.serverextensions import validate_serverextension

# If there's a problem and we don't provide this, the validate function crashes :-(
logger = logging.getLogger('')

if validate_nbextension('pywwt/extension', logger=logger) != []:
    print("Issue detected with nbextension")
    sys.exit(1)

info = get_app_info()

if 'pywwt' not in info['extensions'] or 'pywwt' in info['disabled']:
    print("Issue detected with labextension")
    sys.exit(1)

if validate_serverextension('pywwt', logger=logger) != []:
    print("Issue detected with serverextension")
    sys.exit(1)