Here are the examples of the python api bokeh.util.browser.DummyWebBrowser taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
0
Source : test_browser.py
with MIT License
from rthorst
with MIT License
from rthorst
def test_view_args():
db = bub.DummyWebBrowser
bub.DummyWebBrowser = _RecordingWebBrowser
# test http locations used as-is
bub.view("http://foo", browser="none")
assert _open_args == (('http://foo',), {'autoraise': True, 'new': 0})
# test non-http locations treated as local files
bub.view("/foo/bar", browser="none")
if sys.platform == "win32":
assert _open_args == (('file://' + os.path.splitdrive(os.getcwd())[0] + '\\foo\\bar',), {'autoraise': True, 'new': 0})
else:
assert _open_args == (('file:///foo/bar',), {'autoraise': True, 'new': 0})
# test autoraise passed to open
bub.view("http://foo", browser="none", autoraise=False)
assert _open_args == (('http://foo',), {'autoraise': False, 'new': 0})
# test handling of new values
bub.view("http://foo", browser="none", new="same")
assert _open_args == (('http://foo',), {'autoraise': True, 'new': 0})
bub.view("http://foo", browser="none", new="window")
assert _open_args == (('http://foo',), {'autoraise': True, 'new': 1})
bub.view("http://foo", browser="none", new="tab")
assert _open_args == (('http://foo',), {'autoraise': True, 'new': 2})
bub.DummyWebBrowser = db
def test_NEW_PARAM():