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.
--
Ticket URL: <https://code.djangoproject.com/ticket/25516>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
There is no way this can work. We should document this as a known
limitation.
--
Ticket URL: <https://code.djangoproject.com/ticket/25516#comment:1>
* has_patch: 0 => 1
* component: Testing framework => Documentation
* stage: Unreviewed => Accepted
Comment:
Good enough?
{{{
#!diff
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt
index a48a704..801f9a4 100644
--- a/docs/ref/django-admin.txt
+++ b/docs/ref/django-admin.txt
@@ -1267,6 +1267,10 @@ correctly:
This feature isn't available on Windows. It doesn't work with the Oracle
database backend either.
+If you want to use :mod:`pdb` while debugging tests, you must disable
parallel
+execution (``--parallel=1``). You'll see something like ``bdb.BdbQuit``
if you
+don't.
+
.. warning::
When test parallelization is enabled and a test fails, Django may be
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25516#comment:2>
Comment (by aaugustin):
Yes. Thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/25516#comment:3>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"cb15ceb5555de0799210a0ce37e744fd4f284b36" cb15ceb5]:
{{{
#!CommitTicketReference repository=""
revision="cb15ceb5555de0799210a0ce37e744fd4f284b36"
Fixed #25516 -- Documented that parallel test excution doesn't work with
pdb.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25516#comment:4>
Comment (by Tim Graham <timograham@…>):
In [changeset:"2f9bc9933417d4a2b4b0196cfd9e7e886500e98d" 2f9bc99]:
{{{
#!CommitTicketReference repository=""
revision="2f9bc9933417d4a2b4b0196cfd9e7e886500e98d"
[1.9.x] Fixed #25516 -- Documented that parallel test excution doesn't
work with pdb.
Backport of cb15ceb5555de0799210a0ce37e744fd4f284b36 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25516#comment:5>
--
Ticket URL: <https://code.djangoproject.com/ticket/25516#comment:6>
Comment (by yellowcap):
Good to be certain about how to handle pdb. Thanks!
--
Ticket URL: <https://code.djangoproject.com/ticket/25516#comment:7>