-
Notifications
You must be signed in to change notification settings - Fork 33
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
implement support for interactive debugger #186
Comments
Is this basically the same thing as #14 or does it differ somehow? |
They are clearly related but I am not sure if identical. Shortly if I could define a Now if I think a little bit more there is something different. As far as I know we cannot really use the debugger when we run tests in parallel and disabling parallel run is not something we want. Thus I think this feature could be implemented in a smart way: only if you have test failures, rerun those with debug enabled. I am aware about the small chance that they would pass when run sequentially, but we can live with this risk. If you think these are duplicated feel free to close this one and lets move the useful feedback into one ticket. |
I don't think they are identical. AFAICS #14 would still require you to instrument your code with |
So I just tried to use In comparison it works perfectly when running |
I thin that maybe is time to implement a workaround for allowing us to start the debugger on a failure. See https://bugs.launchpad.net/testrepository/+bug/902881
Instructions from https://wiki.openstack.org/wiki/Testr#Debugging_.28pdb.29_Tests are outdated as they do not include syntax changes (
list
instead oflist-tests
command)This would be of great use for developers.
Ideally we should have a command line parameter (and environment variable) which would enable the alternative behaviour of starting the debugger on failed tests. Environment variable use is really useful as it avoids having to touch the code base to activate it. For example ansible can enable the debugger just by defining ANSIBLE_STRATEGY=debug which will stop on each failed tasks, no need to add params to calls (which an be hidden inside scripts). Once the developer defines the magic variable, it informs that he wants to debug failures.
Maybe we could even trigger this post-execution, when we already know which tests failed, so we would run again in non-parallel mode those that failed (or just call
python -m testtools.run discover --load-list ...
with the list of failed tests)The text was updated successfully, but these errors were encountered: