Opened 9 months ago

Closed 9 months ago

Last modified 9 months ago

#32560 closed Bug (fixed)

Make --pdb cooperate with --buffer

Reported by: Adam Johnson Owned by: nobody
Component: Testing framework Version: 3.1
Severity: Release blocker Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When running test --buffer --pdb, a failure will open pdb but its output isn't seen:

$ ./manage.py test --buffer --pdb
Testing against Django installed in '/Users/chainz/Documents/Projects/django/django'
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
...............F

Since stdin isn't patched, one can enter commands into PDB but not see the output, which is kind of useless. It's also really unclear how to recover, since Ctrl-C doesn't work on the PDB prompt.

The solution would be to undo --buffer's patching before opening PDB.

Change History (6)

comment:1 Changed 9 months ago by Adam Johnson

Has patch: set

comment:2 Changed 9 months ago by Mariusz Felisiak

Needs documentation: set
Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted
Version: dev3.1

Thanks for the report. Marking as a release blocker because it's a bug in the new feature (see #27430 and 9e565386d3fafc8cc15d07095e50d574e5f53802).

comment:3 Changed 9 months ago by Mariusz Felisiak

Needs documentation: unset
Triage Stage: AcceptedReady for checkin

comment:4 Changed 9 months ago by Mariusz Felisiak <felisiak.mariusz@…>

Resolution: fixed
Status: assignedclosed

In 45814af:

Fixed #32560 -- Fixed test runner with --pdb and --buffer on fail/error.

comment:5 Changed 9 months ago by Mariusz Felisiak <felisiak.mariusz@…>

In 46bdc3e:

[3.2.x] Fixed #32560 -- Fixed test runner with --pdb and --buffer on fail/error.

Backport of 45814af6197cfd8f4dc72ee43b90ecde305a1d5a from main

comment:6 Changed 9 months ago by Mariusz Felisiak <felisiak.mariusz@…>

In 95ee8fec:

[3.1.x] Fixed #32560 -- Fixed test runner with --pdb and --buffer on fail/error.

Backport of 45814af6197cfd8f4dc72ee43b90ecde305a1d5a from main

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