本文整理汇总了Python中hypothesis.internal.conjecture.engine.ConjectureRunner.exit_with方法的典型用法代码示例。如果您正苦于以下问题:Python ConjectureRunner.exit_with方法的具体用法?Python ConjectureRunner.exit_with怎么用?Python ConjectureRunner.exit_with使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hypothesis.internal.conjecture.engine.ConjectureRunner
的用法示例。
在下文中一共展示了ConjectureRunner.exit_with方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: accept
# 需要导入模块: from hypothesis.internal.conjecture.engine import ConjectureRunner [as 别名]
# 或者: from hypothesis.internal.conjecture.engine.ConjectureRunner import exit_with [as 别名]
def accept(tf):
runner = ConjectureRunner(tf, settings=TEST_SETTINGS, random=Random(0))
runner.exit_with = lambda reason: None
ran_examples = []
for e in examples:
e = hbytes(e)
data = runner.cached_test_function(e)
ran_examples.append((e, data))
for e, d in ran_examples:
rewritten, status = runner.tree.rewrite(e)
assert status == d.status
assert rewritten == d.buffer
return runner