使用假设库并执行有状态测试时,我如何查看或输出库正在我的代码上尝试的捆绑“服务”?
例子
import hypothesis.strategies as st
from hypothesis.strategies import integers
from hypothesis.stateful import Bundle, RuleBasedStateMachine, rule, precondition
class test_servicediscovery(RuleBasedStateMachine):
services = Bundle('services')
@rule(target=services, s=st.integers(min_value=0, max_value=2))
def add_service(self, s):
return s
问题是:如何打印/查看库生成的 Bundle“服务”变量?