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


Python Storage.get_config方法代码示例

本文整理汇总了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")
开发者ID:pruan,项目名称:TestDepot,代码行数:28,代码来源:test_qatest.py

示例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()
开发者ID:animeshinvinci,项目名称:pycopia,代码行数:19,代码来源:trapserver.py


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