本文整理汇总了Python中hypothesis.internal.conjecture.engine.ConjectureRunner.exit_reason方法的典型用法代码示例。如果您正苦于以下问题:Python ConjectureRunner.exit_reason方法的具体用法?Python ConjectureRunner.exit_reason怎么用?Python ConjectureRunner.exit_reason使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hypothesis.internal.conjecture.engine.ConjectureRunner
的用法示例。
在下文中一共展示了ConjectureRunner.exit_reason方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_weird_drawtime_issues
# 需要导入模块: from hypothesis.internal.conjecture.engine import ConjectureRunner [as 别名]
# 或者: from hypothesis.internal.conjecture.engine.ConjectureRunner import exit_reason [as 别名]
def test_weird_drawtime_issues(drawtime, runtime):
# Regression test for #1346, where we don't have the expected relationship
# 0<=drawtime<= runtime due to changing clocks or floating-point issues.
engine = ConjectureRunner(lambda: None)
engine.exit_reason = ExitReason.finished
engine.status_runtimes[Status.VALID] = [0]
engine.all_drawtimes.append(drawtime)
engine.all_runtimes.extend([0, runtime])
stats = Statistics(engine)
assert stats.draw_time_percentage == 'NaN'