Skip to content

Issue #4774: Document the unsuitability of st.nothing() as a placeholder strategy#4779

Draft
the-13th-letter wants to merge 1 commit into
HypothesisWorks:masterfrom
the-13th-letter:document-gotcha-with-issue4774
Draft

Issue #4774: Document the unsuitability of st.nothing() as a placeholder strategy#4779
the-13th-letter wants to merge 1 commit into
HypothesisWorks:masterfrom
the-13th-letter:document-gotcha-with-issue4774

Conversation

@the-13th-letter

Copy link
Copy Markdown
Contributor

Fixes #4774 (properly this time) by documenting the existing behavior of @given(st.nothing()) as intended—even in the face of @example and @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 Phases documentation 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 documentation works 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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@given(strategies.nothing()) and @example(…) raises Unsatisfiable even if only Phase.explicit is on

1 participant