Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "everything but" recipe using from_type #1967

Merged
merged 13 commits into from May 9, 2019
Merged

Add "everything but" recipe using from_type #1967

merged 13 commits into from May 9, 2019

Conversation

rsokl
Copy link
Contributor

@rsokl rsokl commented May 7, 2019

No description provided.

@rsokl rsokl requested a review from Zac-HD May 7, 2019 17:30
Copy link
Member

@Zac-HD Zac-HD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@Zac-HD Zac-HD added the docs documentation could *always* be better label May 7, 2019
@rsokl
Copy link
Contributor Author

rsokl commented May 7, 2019

@Zac-HD it looks like there may be a flaky test unrelated to this PR. Any thoughts on why this test would start failing?

@rsokl
Copy link
Contributor Author

rsokl commented May 7, 2019

Another interesting fail case with Python 2.7

OverflowError: Python int too large to convert to C long

I'm tempted to just chop that list of types down to four really boring types...

@Zac-HD
Copy link
Member

Zac-HD commented May 8, 2019

it looks like there may be a flaky test unrelated to this PR. Any thoughts on why this test would start failing?

#1970.

I'm tempted to just chop that list of types down to four really boring types...

🤦‍♂️ If replacing st.sampled_from(many_types) with from_type(type) doesn't work, we have a real bug.

Copy link
Member

@Zac-HD Zac-HD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great recipes deserve detailed reviews 😄

We've fixed the two unrelated flaky tests too, so rebase on master and next time you push everything should pass.

hypothesis-python/RELEASE.rst Outdated Show resolved Hide resolved
hypothesis-python/src/hypothesis/_strategies.py Outdated Show resolved Hide resolved
hypothesis-python/src/hypothesis/_strategies.py Outdated Show resolved Hide resolved
hypothesis-python/src/hypothesis/_strategies.py Outdated Show resolved Hide resolved
hypothesis-python/tests/nocover/test_from_type_recipe.py Outdated Show resolved Hide resolved
hypothesis-python/tests/nocover/test_from_type_recipe.py Outdated Show resolved Hide resolved
@Zac-HD Zac-HD changed the title Adds a recipe for drawing values for "everything except" specified types Add "everything but" recipe using from_type May 9, 2019
@Zac-HD Zac-HD merged commit 511c67a into master May 9, 2019
@Zac-HD Zac-HD deleted the everything_but branch May 9, 2019 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs documentation could *always* be better
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants