-
Notifications
You must be signed in to change notification settings - Fork 52
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
pytest-watch with debugger #21
Comments
That's an interesting case. I think that'd be a good thing to handle. Any idea how pytest works with What do you think, @Glueon? |
Yes, pytest keeps running when it is in the ipdb. I do not know if a forwarded But I think you can just block ptw in all cases untill pytest finishes. Then |
Excellent.
Ah, very true. Good point.
I thought about that initially before replying. The downside is then you sacrifice the feature of cancelling a long-running testsuite when you save a file. It's a nice feature of Another approach would be to add a |
I think |
It may also make sense to suspend any pytest re-runs until the currently running pytest process has finished (although the events can still be collected / spooled). Maybe just make that a default option to avoid yet another command line arg. |
@aldanor I personally work on some bigger projects with long-running test suites. The cancelling behavior is really nice in these cases since it nearly doubles the time running tests, which can be significant. But you're right, it'd be best to not introduce an option if we can avoid it. I wonder if there's a simple cross-platform way to detect whether If there's no other option, I think I'd still prefer cancel-by-default over a new CLI argument. Have any other ideas? |
Question for you. If |
For reference, with |
Fixed with 18a99b8, which adds Just published v4.0, which includes these changes. Feel free to re-open if there's still an issue! |
Quite often I invoke pytest with the
--ipdb
option so I could see what is wrong with my code on first failure.So I invkoed pytest-watch with
ptw -- --ipdb
. The problem is that if after droping into ipdb I modify a test or a file it starts a new session and the one with ipdb console goes to the background. In the end I end up with dozens of ipdb instances running.Is it possible to block ptw if current session has dropped to the ipdb?
The text was updated successfully, but these errors were encountered: