bokeh.io.output.output_notebook

Here are the examples of the python api bokeh.io.output.output_notebook taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

3 View Source File : test_output.py
License : MIT License
Project Creator : rthorst

    def test_no_args(self, mock_run_notebook_hook):
        default_load_jupyter_args = (None, False, False, 5000)
        bio.output_notebook()
        assert mock_run_notebook_hook.call_count == 1
        assert mock_run_notebook_hook.call_args[0] == ("jupyter", "load") + default_load_jupyter_args
        assert mock_run_notebook_hook.call_args[1] == {}

    @patch('bokeh.io.output.run_notebook_hook')

3 View Source File : test_showing.py
License : MIT License
Project Creator : rthorst

def test_show_with_app(mock_run_notebook_hook):
    curstate().reset()
    app = Application()
    output_notebook()
    bis.show(app, notebook_url="baz")
    assert curstate().notebook_type == "jupyter"
    assert mock_run_notebook_hook.call_count == 1
    assert mock_run_notebook_hook.call_args[0][0] == curstate().notebook_type
    assert mock_run_notebook_hook.call_args[0][1:] == ("app", app, curstate(), "baz")
    assert mock_run_notebook_hook.call_args[1] == {}

@patch('bokeh.io.showing._show_with_state')