-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
pytest should warn about threads kept alive after testing #3662
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
Comments
as pytest itself doesnt support threading, a plugin should handle it |
Thanks for the suggestion @fabioz, I agree with @RonnyPfannschmidt, a plugin looks like the correct place for this functionality. Should be simple as well, the code from PyDev could go into a Using pytest-cookiecutter will also make it very easy to set a repository up. I'm closing this, but thanks again for the suggestion, we appreciate it! |
Could you tell me how to use pytest-cookiecutter solve the problem that pytest itself doesnt support threading please, thankyou very much @nicoddemus |
@lzy017 is just a template to get started with making a pytest plugin, its not solving/sorting any of the threading related issues, thats something else |
thnaks could you tell me pytest how to support threading without fixture @RonnyPfannschmidt |
its not clear to me what you are asking of and i did not investigate the apis needed for debug tooling myself, so you are on your own of you want to tackle this |
Hi @lzy017,
My suggestion in #3662 (comment) is about writing a new plugin which would check for alive threads during |
btw: #5244 is about pytest not exiting if pdb is still active in some thread. |
Given some code such as:
ideally pytest would warn that threads are still running after the test finishes (as the process is still running the ci will fail the build because of a timeout without any signal of what could be the issue).
As a note, the pydev test runner does give such a message, so, that implementation could be borrowed:
https://github.com/fabioz/PyDev.Debugger/blob/master/runfiles.py#L284
The text was updated successfully, but these errors were encountered: