Пример #1
0
 def test_setup_extension_true(self, mock_system):
     setup_extension(True)
     mock_system.assert_called_with("jupyter nbextension enable jovian_nb_ext/main --sys-prefix")
Пример #2
0
 def test_setup_extension_false(self, mock_system):
     setup_extension(False)
     mock_system.assert_called_with("jupyter nbextension disable jovian_nb_ext/main --sys-prefix")
Пример #3
0
def extension_enable(ctx):
    """Enable Jovian’s Jupyter notebook extension."""

    setup_extension(enable=True)
Пример #4
0
def extension_disable(ctx):
    """Disable Jovian’s Jupyter notebook extension."""

    setup_extension(enable=False)
Пример #5
0
def test_setup_extension_true(mock_system, enable, expected_result):
    setup_extension(enable=enable)
    mock_system.assert_called_with(expected_result)