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

integers(min_value=0) always produces longs on Python 2 #1732

Closed
DRMacIver opened this issue Jan 2, 2019 · 0 comments
Closed

integers(min_value=0) always produces longs on Python 2 #1732

DRMacIver opened this issue Jan 2, 2019 · 0 comments
Labels
bug something is clearly wrong here

Comments

@DRMacIver
Copy link
Member

>>> find(st.integers(min_value=0), lambda x: True)
0L

The underlying culprit seems to be that our floor and ceil functions in hypothesis.internal.compat always return long values. This is because we explicitly use _long_int_type. It's unclear that this is necessary - using int(x) will generally do the right thing for values that don't fit into an int.

@Zac-HD Zac-HD added the bug something is clearly wrong here label Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something is clearly wrong here
Projects
None yet
Development

No branches or pull requests

2 participants