本文整理汇总了Python中twisted.trial.runner._makeResult函数的典型用法代码示例。如果您正苦于以下问题:Python _makeResult函数的具体用法?Python _makeResult怎么用?Python _makeResult使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_makeResult函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_exitfirst
def test_exitfirst(self):
"""
If trial was passed the C{--exitfirst} option, the constructed test
result object is wrapped with L{reporter._ExitWrapper}.
"""
self.parseOptions(["--exitfirst"])
runner = self.getRunner()
result = runner._makeResult()
self.assertIsInstance(result, reporter._ExitWrapper)
示例2: test_uncleanWarningsOffByDefault
def test_uncleanWarningsOffByDefault(self):
"""
By default Trial sets the 'uncleanWarnings' option on the runner to
False. This means that dirty reactor errors will be reported as
errors. See L{test_reporter.TestDirtyReactor}.
"""
self.parseOptions([])
runner = self.getRunner()
self.assertNotIsInstance(runner._makeResult(), reporter.UncleanWarningsReporterWrapper)
示例3: test_getsUncleanWarnings
def test_getsUncleanWarnings(self):
"""
Specifying '--unclean-warnings' on the trial command line will cause
reporters to be wrapped in a device which converts unclean errors to
warnings. See L{test_reporter.TestDirtyReactor} for implications.
"""
self.parseOptions(["--unclean-warnings"])
runner = self.getRunner()
self.assertIsInstance(runner._makeResult(), reporter.UncleanWarningsReporterWrapper)
示例4: test_runner_get_result
def test_runner_get_result(self):
self.parseOptions([])
runner = self.getRunner()
result = runner._makeResult()
self.assertEqual(result.__class__, self.config['reporter'])
示例5: test_runner_can_get_reporter
def test_runner_can_get_reporter(self):
self.parseOptions([])
result = self.config["reporter"]
runner = self.getRunner()
self.assertEqual(result, runner._makeResult().__class__)