#25516 closed Cleanup/optimization (fixed)
Document that pdb isn't compatible with parallel test runner
Reported by: | Daniel Wiesmann | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.9a1 |
Severity: | Normal | Keywords: | parallel tests |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I regularly use the testing framework to run code I am working on and use pdb/ipdb to halt the execution and do some "manual" testing.
In parallel testing mode I was not able to do that, as the pdb.set_trace() statement exits automatically. I guess that this is could be expected and maybe desired behaviour, but if not it would be nice to be able to ipdb into tests run in parallel as well.
It took me a while to find the reason for the automatic exits, so if its not possible to pdb into parlallel tests, maybe adding a line or two in the documentation about this could be helpful for others.
Change History (7)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Component: | Testing framework → Documentation |
---|---|
Has patch: | set |
Triage Stage: | Unreviewed → Accepted |
Good enough?
-
docs/ref/django-admin.txt
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index a48a704..801f9a4 100644
a b correctly: 1267 1267 This feature isn't available on Windows. It doesn't work with the Oracle 1268 1268 database backend either. 1269 1269 1270 If you want to use :mod:`pdb` while debugging tests, you must disable parallel 1271 execution (``--parallel=1``). You'll see something like ``bdb.BdbQuit`` if you 1272 don't. 1273 1270 1274 .. warning:: 1271 1275 1272 1276 When test parallelization is enabled and a test fails, Django may be
comment:6 by , 9 years ago
Summary: | Debugging with pdb in parallel tests → Document that pdb isn't compatible with parallel test runner |
---|
There is no way this can work. We should document this as a known limitation.