Hypothesis puts configuration for stateful machines, like stateful_step_count, on @settings. This makes sense in Hypothesis because state machines are top-level tests. In Hegel, a single test case of a state machine is invoked by hegel::stateful::run inside of a hegel::test, so it's less clear where to place our stateful_step_count equivalent.
Options:
- (1) Add to
#[hegel::test] settings. Applies to all state machines invoke in that test.
- (2) Add settings parameters to
hegel::stateful::run. Applies to just that test case.
- This implies
stateful_step_count can vary between test cases. Are we okay with this? Will this cause flakiness?
- (3) Add settings to
#[hegel::state_machine]. Applies to that state machine for all test cases.
I think my preference is (3) > (2) > (1).
See also #148 (comment).
Hypothesis puts configuration for stateful machines, like
stateful_step_count, on@settings. This makes sense in Hypothesis because state machines are top-level tests. In Hegel, a single test case of a state machine is invoked byhegel::stateful::runinside of ahegel::test, so it's less clear where to place ourstateful_step_countequivalent.Options:
#[hegel::test]settings. Applies to all state machines invoke in that test.hegel::stateful::run. Applies to just that test case.stateful_step_countcan vary between test cases. Are we okay with this? Will this cause flakiness?#[hegel::state_machine]. Applies to that state machine for all test cases.I think my preference is (3) > (2) > (1).
See also #148 (comment).