Remove misleading assume example.#4061
Merged
Zac-HD merged 1 commit intoHypothesisWorks:masterfrom Sep 29, 2024
Merged
Conversation
The given snippet doesn't find satisfying examples anymore. Not sure if it can be fixed through some settings but it is misleading in its current state.
Member
|
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! |
DRMacIver
reviewed
Aug 5, 2024
Member
DRMacIver
left a comment
There was a problem hiding this comment.
I think this section is a bit confusing with this example just straightforwardly deleted, and the example should be retained but with the actual error message produced and an explanation that this demonstrates the limitations of assume, suggesting rewriting it to use lists(integers(min_value=0), min_size=11) instead of the assume.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
#2600
which was mistakenly reverted in:
#3238