HypothesisWorks / hypothesis

Hypothesis is a powerful, flexible, and easy to use library for property-based testing.
https://hypothesis.works
Other
7.58k stars 587 forks source link

Remove misleading assume example. #4061

Closed abeakkas closed 1 month ago

abeakkas commented 3 months ago

Given snippet doesn't find any satisfying examples anymore. Not sure if it can be fixed through tweaking some settings but it is misleading in its current state. I don't know what changed since the original documentation was added, maybe @DRMacIver can comment.

See the relevant PR: https://github.com/HypothesisWorks/hypothesis/pull/2600 which was mistakenly reverted in: https://github.com/HypothesisWorks/hypothesis/pull/3238

DRMacIver commented 3 months ago

Huh it's hard to see how this example would ever have passed in modern Hypothesis. I wonder how old it is - I think some of the early versions had features that might have allowed it to pass, but I think it's probably been broken since 3.0 came out. Thanks for the catch!