These assertions in Hypothesis check that if forced is True, then p > 0, and vice-versa at the other end - because it would be invalid to generate the forced value otherwise. However, the following example fails with Crosshair:
from hypothesis import settings
from hypothesis.stateful import RuleBasedStateMachine, rule, run_state_machine_as_test
@run_state_machine_as_test
@settings(backend="crosshair", deadline=None)
class IntListRules(RuleBasedStateMachine):
@rule()
def a(self): pass
@rule()
def b(self): pass
I'm reporting it here because of the draw_boolean() symptom, but I actually find it pretty plausible that it's an issue in Crosshair's reasoning about the internal FeatureStrategy (see here). As usual, found in https://github.com/HypothesisWorks/hypothesis/pull/4034 🙂
Hmm. Well, I'm not sure exactly HOW it fixes it, but if I make my provider respect the p=1 and p=0 cases, it seems to fix your example, so Ima roll with that. Fixed in 0.0.8!
These assertions in Hypothesis check that if
forced is True
, thenp > 0
, and vice-versa at the other end - because it would be invalid to generate the forced value otherwise. However, the following example fails with Crosshair:I'm reporting it here because of the
draw_boolean()
symptom, but I actually find it pretty plausible that it's an issue in Crosshair's reasoning about the internalFeatureStrategy
(see here). As usual, found in https://github.com/HypothesisWorks/hypothesis/pull/4034 🙂