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
Filter-rewriting for length filters #3824
Conversation
Yep, falling back to rejection sampling here. Note that in the case where |
1b6420c
to
ba9ee3c
Compare
ba9ee3c
to
f5e9f84
Compare
This comment was marked as resolved.
This comment was marked as resolved.
hypothesis-python/src/hypothesis/strategies/_internal/strings.py
Outdated
Show resolved
Hide resolved
Crucially, this allows for consistent reprs between processes, and thus pytest-xargs support.
I've pushed a couple of tweaks and some more tests, and I think it's almost ready to merge - there's more we can do to support other collection types, but I'd like to ship what we have soon and then return for a follow-up PR. (both because it's easier to make and review smaller PRs, and so users can get some benefits asap) Remaining tasks:
|
Got it, will have this done tomorrow after my flight! |
OK, I started to leave a code review, but the chain of reasoning I ended up going down was very long and the diff was pretty short, so I pushed it instead. In brief:
Whew. Notes longer than the diff? |
This is great! Thanks for the finish + writeup 😃 |
Resolves part of #3795
So we take the components of the lambda and re-write with them. However, how would we keep in mind the case that the
len
function has been rebound/redefined? Or do you mean falling back to rejection sampling in this case?