Hey all,
I started using Hypothesis recently, have experience with PBT in other languages.
I've been trying to make a certain behavior work implementing a RuleBasedStateMachine:
Create an object in init that will have accountsm, e.g. self.obj = cls(...)
Have a rule for registering an account
Have another rule that can only perform on accounts that meet a certain condition.
What I would have wanted was to create a composite strategy that can accept self.obj, but I find no way to pass it in.
Additionally, even if I were to use a precondition to filter only for accounts that meet my requirement, how do I select from them correctly (such that narrowing and reproduction will work) in my rule?
I've read the documentation and examples, haven't been able to find a solution to this problem. Am I missing something or is it not possible the way Hypothesis works?
Thanks,
Ben