0

I am writing a test using Stateful Testing feature of hypothesis.

I am finding out that after a certain number of state changes, the testing restarts from the beginning.

How can I make it continue along existing path?

I have set max_examples=1 and stateful_step_count=999999 but that does not seem to help.

Georgy
  • 12,464
  • 7
  • 65
  • 73
sureshvv
  • 4,234
  • 1
  • 26
  • 32

1 Answers1

0

Occasional restarts are an intentional feature of stateful tests, and must be possible for us to present a minimal (fewest steps) counterexample if your test fails.

In your specific case, I suspect that the statemachine is 'getting stuck' and having to retry some steps. Because it could not complete max_step steps, it may not count as an example for max_examples!

For more detailed comments, I'd have to see your actual code and an example output :-)

Zac Hatfield-Dodds
  • 2,455
  • 6
  • 19