Issue #4774: Document the unsuitability of st.nothing() as a placeholder strategy#4779
Draft
the-13th-letter wants to merge 1 commit into
Draft
Conversation
…) as a placeholder strategy
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.
Fixes #4774 (properly this time) by documenting the existing behavior of
@given(st.nothing())as intended—even in the face of@exampleand@settings(phases=["explicit"])—and warning others who assume this to work (like I did) that it actually won't.I would like to add a warning to the
Phasesdocumentation too, but I did not see a natural place to put this.I am also still wondering what the actual use case for
st.nothing()is, given that it can't be used as a runtime-unevaluated placeholder strategy. See my earlier comment on this.(This is a documentation-only fix, so I did not bother running the test suite or somesuch; just that
build.sh documentationworks and that the output looks reasonable. I'm also rather unfamiliar with reST/Sphinx in general—I'm a Markdown/mkdocstrings user—and my markup may be somewhat off.)