mirror of
https://github.com/django/django.git
synced 2025-08-14 15:50:41 +00:00
[3.2.x] Fixed #32560 -- Fixed test runner with --pdb and --buffer on fail/error.
Backport of 45814af619
from main
This commit is contained in:
parent
3ff859b789
commit
46bdc3eaf0
2 changed files with 5 additions and 1 deletions
|
@ -102,6 +102,8 @@ class PDBDebugResult(unittest.TextTestResult):
|
||||||
self.debug(err)
|
self.debug(err)
|
||||||
|
|
||||||
def debug(self, error):
|
def debug(self, error):
|
||||||
|
self._restoreStdout()
|
||||||
|
self.buffer = False
|
||||||
exc_type, exc_value, traceback = error
|
exc_type, exc_value, traceback = error
|
||||||
print("\nOpening PDB: %r" % exc_value)
|
print("\nOpening PDB: %r" % exc_value)
|
||||||
pdb.post_mortem(traceback)
|
pdb.post_mortem(traceback)
|
||||||
|
|
|
@ -9,4 +9,6 @@ Django 3.1.8 fixes several bugs in 3.1.7.
|
||||||
Bugfixes
|
Bugfixes
|
||||||
========
|
========
|
||||||
|
|
||||||
* ...
|
* Fixed a bug in Django 3.1 where the output was hidden on a test error or
|
||||||
|
failure when using :option:`test --pdb` with the
|
||||||
|
:option:`--buffer <test --buffer>` option (:ticket:`32560`).
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue