本文整理汇总了Python中bokeh.client.ClientSession.request_server_info方法的典型用法代码示例。如果您正苦于以下问题:Python ClientSession.request_server_info方法的具体用法?Python ClientSession.request_server_info怎么用?Python ClientSession.request_server_info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bokeh.client.ClientSession
的用法示例。
在下文中一共展示了ClientSession.request_server_info方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_request_server_info
# 需要导入模块: from bokeh.client import ClientSession [as 别名]
# 或者: from bokeh.client.ClientSession import request_server_info [as 别名]
def test_request_server_info(self):
application = Application()
with ManagedServerLoop(application) as server:
session = ClientSession(url=server.ws_url, io_loop=server.io_loop)
session.connect()
assert session.connected
assert session.document is None
info = session.request_server_info()
from bokeh import __version__
assert info['version_info']['bokeh'] == __version__
assert info['version_info']['server'] == __version__
session.close()
session.loop_until_closed()
assert not session.connected
示例2: test_request_server_info
# 需要导入模块: from bokeh.client import ClientSession [as 别名]
# 或者: from bokeh.client.ClientSession import request_server_info [as 别名]
def test_request_server_info(self):
application = Application()
with ManagedServerLoop(application) as server:
session = ClientSession(session_id='test_request_server_info',
websocket_url=ws_url(server),
io_loop=server.io_loop)
session.connect()
assert session.connected
assert session.document is None
info = session.request_server_info()
from bokeh import __version__
assert info['version_info']['bokeh'] == __version__
assert info['version_info']['server'] == __version__
session.close()
session.loop_until_closed(suppress_warning=True)
assert not session.connected