Strategies deduplication does not working for st.none
as expected in OneOfStrategy.element_strategies
#2327
Labels
legibility
make errors helpful and Hypothesis grokable
question
not sure it's a bug? questions welcome
Hello!
Some time ago I created an issue - #2087
and recently got back to the investigations regarding the cause of the observed behavior. A took this case:
one_of(none(), none(), booleans())
That was generating 85 examples, while there are only possible 3 cases (
None
,True
,False
).I found this code in
OneOfStrategy
that should remove duplicates (I assume):But
if s in seen
doesn't work forst.none()
:And for
just
(which is used innone
). I assume that "just" strategy instances can be deduplicated at least in some cases (forjust(None)
for example). What do you think? Could you, please, share some information about this behavior?The text was updated successfully, but these errors were encountered: