-
Notifications
You must be signed in to change notification settings - Fork 234
Fix compatibility with pytest master #554
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
Fix compatibility with pytest master #554
Conversation
Fix the autouse fixture which diverts atexit.register calls to support the correct signature.
Hello @nicoddemus. I have a question about this code. When I test hypothesis 5.15.1 with this version of pytest-xdist and pytest 6.0.0rc1 I get:
But the only place where pytest_warning_captured is even mentioned is in pytest and pytest-xdist code :/ |
I don't know much about xdist, but from what I can see, this PR only implements the new Perhaps something similar to c5f65b3 is needed here as well? I'm sure @nicoddemus can say more though, I'm just guessing. |
This is... bad, I quite like using Hypothesis with pytest-xdist and I wouldn't like to break it for our users either. Looking at the traceback - I have something very similar locally - I think the problem might be in either |
I don't think this is related to hypothesis per se - I assume anything using xdist will get the warning, but hypothesis configures its testsuite to turn that warning into an error? |
Indeed. |
Hypothesis does indeed treat all warnings as errors. A quick attempt to reproduce this on a small example with |
Hey folks, Yeah, the problem is that the worker always triggers the deprecated hook... I will open a PR shortly where it will trigger one hook or the other, but not both, based on availability. 👍 |
pytest_warning_recorded
hook.