I want to create a hypothesis.stateful.RuleBasedStateMachine to run stateful testing in Python. When the test is running, I want it to be deterministic and either update some snapshots or compare with existing, so that I can manually review whether the changes in the snapshot makes sense.
Normally I can use syrupy's snapshot assertion fixture to compare and update snapshot files.
Unfortunately, hypothesis's stateful testing does not support fixtures, therefore I cannot directly use the snapshot fixture.
What should I do to use syrupy with hypothesis in stateful testing?
I think you'll need to ask
syrupyto support a non-fixtures interface. From skimming the source this looks technically pretty reasonable; they're mostly using Pytest as source of configuration and for the neat dev experience that fixtures offer. Unfortunately I don't see a way to support fixtures for Hypothesis stateful tests.I'm surprised that stateful testing could be deterministic enough to take a single stable snapshot; even in deterministic mode we usually run many diverse inputs. Perhaps stateful testing isn't offering you much value here?