Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#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 Aymeric Augustin, 9 years ago

There is no way this can work. We should document this as a known limitation.

comment:2 by Tim Graham, 9 years ago

Component: Testing frameworkDocumentation
Has patch: set
Triage Stage: UnreviewedAccepted

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:  
    12671267This feature isn't available on Windows. It doesn't work with the Oracle
    12681268database backend either.
    12691269
     1270If you want to use :mod:`pdb` while debugging tests, you must disable parallel
     1271execution (``--parallel=1``). You'll see something like ``bdb.BdbQuit`` if you
     1272don't.
     1273
    12701274.. warning::
    12711275
    12721276    When test parallelization is enabled and a test fails, Django may be

comment:3 by Aymeric Augustin, 9 years ago

Yes. Thanks.

comment:4 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: newclosed

In cb15ceb5:

Fixed #25516 -- Documented that parallel test excution doesn't work with pdb.

comment:5 by Tim Graham <timograham@…>, 9 years ago

In 2f9bc99:

[1.9.x] Fixed #25516 -- Documented that parallel test excution doesn't work with pdb.

Backport of cb15ceb5555de0799210a0ce37e744fd4f284b36 from master

comment:6 by Tim Graham, 9 years ago

Summary: Debugging with pdb in parallel testsDocument that pdb isn't compatible with parallel test runner

comment:7 by Daniel Wiesmann, 9 years ago

Good to be certain about how to handle pdb. Thanks!

Note: See TracTickets for help on using tickets.
Back to Top