[英]How can we control the sequence of function execution in Python Nose test
[英]Can we control test case distribution in Hypothesis Python framework?
可以指示基于属性的框架 QuickCheck 使用收集和测量实用函数来测量特定测试用例生成的频率(例如:同一个人平均下订单的频率,下空订单的频率)。 是否有可能像 Quickcheck 一样,在 Hypothesis 框架中调整由基于规则的状态机生成的测试用例的分布?
您可以使用 event() 函数和 pytest 的 --hypothesis-show-statistics 参数查看自定义事件的频率。
我们的有状态测试不支持用户定义的分布,我们发现这通常会适得其反,但我们会自动使用 Swarm 测试为您提供经验上优于天真的随机分布 - 请参阅https://hypothesis。 readthedocs.io/en/latest/changes.html#v4-49-0 - 还有其他技巧。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.