[3.1.x] Fixed #32560 -- Fixed test runner with --pdb and --buffer on fail/error.
Backport of 45814af619
from main
This commit is contained in:
parent
b58b214856
commit
95ee8fecb5
|
@ -92,6 +92,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…
Reference in New Issue