本文整理汇总了Python中storage.Storage.get_config方法的典型用法代码示例。如果您正苦于以下问题:Python Storage.get_config方法的具体用法?Python Storage.get_config怎么用?Python Storage.get_config使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类storage.Storage
的用法示例。
在下文中一共展示了Storage.get_config方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_method
# 需要导入模块: from storage import Storage [as 别名]
# 或者: from storage.Storage import get_config [as 别名]
def test_method(self):
cf = config.get_config()
cf.report = NULLREPORT
suite = qatest.TestSuite(cf)
expected = [qatest.PASSED, qatest.FAILED, qatest.ABORT,
qatest.ABORT, qatest.FAILED, qatest.FAILED,
qatest.FAILABORT, None, None]
suite.add_test(TestTest, DO_PASSED)
suite.add_test(TestTest, DO_FAILED)
suite.add_test(TestTest, DO_ABORT)
suite.add_test(TestTest, DO_TestAbortError)
suite.add_test(TestTest, DO_TestFailError)
suite.add_test(TestTest, DO_FAILASSERT)
suite.add_test(TestTest, DO_FAILABORT)
suite.add_test(TestInfo, "You should NOT see this message!")
suite.add_test(TestReturnValues)
suite()
res = suite.results()
assert len(res) == len(expected), "number of results does not match suite!"
if res != expected:
self.diagnostic("expected values:")
self.diagnostic(repr(expected))
self.diagnostic("do not equal result:")
self.diagnostic(repr(res))
return self.failed("not expected values!")
return self.passed("got expected return values")
示例2: pytrapd
# 需要导入模块: from storage import Storage [as 别名]
# 或者: from storage.Storage import get_config [as 别名]
def pytrapd(argv):
"""pytrapd [-d]
Run the Gtest trap daemon. Fork to background if -d is provided.
"""
import asyncio
if len(argv) > 1 and argv[1] == "-d":
import daemonize
daemonize.daemonize()
cf = Storage.get_config()
recorder = TrapRecorder(cf)
mailer = TrapMailer(cf)
handlers = [recorder, mailer]
dispatcher = traps.get_dispatcher(handlers)
asyncio.poller.loop()