當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。