【发布时间】:2020-02-15 14:16:37
【问题描述】:
我是 Hypothesis 的新手,我想测试一个从 Hypothesis Strategy 获取整数输入的函数:
@given(strategy.integers(min_value=2, max_value=9))
def test_function(t):
#...
假设检验从 min_value 2 到 9 的函数。
有什么办法可以扭转这种情况吗? 我希望测试用例以 t=9 而不是 t=2 开始。
【问题讨论】:
标签: python unit-testing testing property-based-testing python-hypothesis