Opened 4 years ago

Closed 4 years ago

Last modified 4 years 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 by Adam Johnson, 4 years ago

Has patch: set

comment:2 by Mariusz Felisiak, 4 years ago

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 by Mariusz Felisiak, 4 years ago

Needs documentation: unset
Triage Stage: AcceptedReady for checkin

comment:4 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In 45814af:

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

comment:5 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

In 46bdc3e:

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

Backport of 45814af6197cfd8f4dc72ee43b90ecde305a1d5a from main

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

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