-
Notifications
You must be signed in to change notification settings - Fork 586
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
Stack overflows are often reported as flaky. #2494
Comments
|
Sure, I'd be happy to consider that as a feature. I'm not sure what the best special handling might be for it though. The easiest thing to do might be always to just immediately re-raise |
|
Yeah, I considered the recursion limit fiddling too and agree it sounds scary. I guess I'd say that although re-raising RecursionError doesn't sound like the optimal behavior, it feels incrementally better? |
I wonder if there's something relatively unintrusive we can do here, like setting the recursionlimit so that inside the test function we are always effectively at the top level. Something like setting it to the default recursion limit plus the current stack depth?
One light touch option might be to improve the error message for flakiness for Hmm. Potentially another problem here is that the way we differentiate exceptions is by type and line number. We might need to stop doing that for |
|
Interesting. Indeed, perhaps the tools we need to reset the stack are there, and would work?: ... and inside a context manager or something. |
|
Sounds good to me - it's a terrible hack to fix a rare UX problem, but that's most of our internals 😂 I'd want to add a check on |
As mentioned here, deterministic tests that can hit python's maximum recursion depth may be reported as flaky by Hypothesis, because it is attempted at different initial stack depths.
A simple example that Hypothesis claims is flaky:
Something of a question, rather than a bug report: would we consider detecting RecursionError and giving it some kind of special treatment?
The text was updated successfully, but these errors were encountered: