当前位置: 首页>>代码示例>>Python>>正文


Python PsDashRunner.create_from_args方法代码示例

本文整理汇总了Python中psdash.run.PsDashRunner.create_from_args方法的典型用法代码示例。如果您正苦于以下问题:Python PsDashRunner.create_from_args方法的具体用法?Python PsDashRunner.create_from_args怎么用?Python PsDashRunner.create_from_args使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在psdash.run.PsDashRunner的用法示例。


在下文中一共展示了PsDashRunner.create_from_args方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_reload_logs

# 需要导入模块: from psdash.run import PsDashRunner [as 别名]
# 或者: from psdash.run.PsDashRunner import create_from_args [as 别名]
 def test_reload_logs(self):
     _, filename = tempfile.mkstemp()
     r = PsDashRunner.create_from_args(['-l', filename])
     pre_count = len(r.app.psdash.logs.available)
     c = r.reload_logs()
     post_count = len(r.app.psdash.logs.available)
     self.assertEqual(pre_count, post_count)
开发者ID:backchenlin,项目名称:psdash,代码行数:9,代码来源:test_run.py

示例2: test_args_log

# 需要导入模块: from psdash.run import PsDashRunner [as 别名]
# 或者: from psdash.run.PsDashRunner import create_from_args [as 别名]
 def test_args_log(self):
     _, filename = tempfile.mkstemp()
     r = PsDashRunner.create_from_args(['-l', filename])
     self.assertEqual(r.app.config['PSDASH_LOGS'][0], filename)
开发者ID:backchenlin,项目名称:psdash,代码行数:6,代码来源:test_run.py

示例3: test_args_debug

# 需要导入模块: from psdash.run import PsDashRunner [as 别名]
# 或者: from psdash.run.PsDashRunner import create_from_args [as 别名]
 def test_args_debug(self):
     r = PsDashRunner.create_from_args(['-d'])
     self.assertTrue(r.app.debug)
开发者ID:backchenlin,项目名称:psdash,代码行数:5,代码来源:test_run.py

示例4: test_args_port

# 需要导入模块: from psdash.run import PsDashRunner [as 别名]
# 或者: from psdash.run.PsDashRunner import create_from_args [as 别名]
 def test_args_port(self):
     r = PsDashRunner.create_from_args(['-p', '5555'])
     self.assertEqual(r.app.config['PSDASH_PORT'], 5555)
开发者ID:backchenlin,项目名称:psdash,代码行数:5,代码来源:test_run.py

示例5: test_args_bind

# 需要导入模块: from psdash.run import PsDashRunner [as 别名]
# 或者: from psdash.run.PsDashRunner import create_from_args [as 别名]
 def test_args_bind(self):
     r = PsDashRunner.create_from_args(['-b', '10.0.0.1'])
     self.assertEqual(r.app.config['PSDASH_BIND_HOST'], '10.0.0.1')
开发者ID:backchenlin,项目名称:psdash,代码行数:5,代码来源:test_run.py

示例6:

# 需要导入模块: from psdash.run import PsDashRunner [as 别名]
# 或者: from psdash.run.PsDashRunner import create_from_args [as 别名]
from psdash.run import PsDashRunner
application = PsDashRunner.create_from_args().app

application.config['SECRET_KEY'] = 'ravioliravioligivemetheformuoli'
application.psdash.logs.add_patterns(['/var/log/nginx/access.log'])
开发者ID:tummychow,项目名称:typhon,代码行数:7,代码来源:passenger_wsgi.py


注:本文中的psdash.run.PsDashRunner.create_from_args方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。