how to add example for RuleBasedStateMachine in python hypothesis

22 Views Asked by At

we can use @example for a normal test as following:

@given(text())
@example("Hello world")
@example(x="Some very long string")
def test_some_code(x):
    pass

but how to reproduce failures for RuleBasedStateMachine with @example?

1

There are 1 best solutions below

1
Zac Hatfield-Dodds On

Unfortunately there is no equivalent to @example() for RuleBasedStateMachine - instead, we recommend writing specific cases as traditional unit tests.