-
Notifications
You must be signed in to change notification settings - Fork 51
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
Crash when integer has (way) too many digits #285
Comments
Oh wow. OOC, from a product perspective, what does hypothesis do about this? Also, does hypothesis do something to avoid hitting this limit internally? Someone might want to make a test to check how this limitation affects their code, but hypothesis still needs to display the counterexample. |
Currently we don't do anything particular to handle this case; unbounded integers only go up to 256-bits by default and that regression test would fail if we happened to convert to a string internally. Having been reminded that this new error exists, I'm planning to upgrade the pretty-printer to display too-large integers in hexadecimal instead. HypothesisWorks/hypothesis#4058 / https://github.com/HypothesisWorks/hypothesis/pull/4065/files#diff-cdb64915e1b0b4db52f343734ea143e51ccf52a88bfa4175eb1038363444ad2cR742-R751 |
This is a horrible regression test for a case where Hypothesis wasn't handling large integers (HypothesisWorks/hypothesis#3874), but I presume you'll want to do something which isn't crashing. And it looks like we have two meaningfully distinct issues in the same traceback! Relevant stdlib docs here; converting really big ints to strings is expensive if the base is not a power of two.
(via HypothesisWorks/hypothesis#4034)
The text was updated successfully, but these errors were encountered: