mirror of
https://github.com/django/django.git
synced 2025-07-07 03:09:22 +00:00
[4.0.x] Fixed #33149 -- Made test runner --pdb option work with subTest().
Thanks Lucidot for the report and Mariusz Felisiak for the initial patch. Backport of 7872971dfbb818177168e64c24a933e48ce01206 from main
This commit is contained in:
parent
1aada25eeb
commit
44d11e5b2c
@ -107,6 +107,11 @@ class PDBDebugResult(unittest.TextTestResult):
|
||||
super().addFailure(test, err)
|
||||
self.debug(err)
|
||||
|
||||
def addSubTest(self, test, subtest, err):
|
||||
if err is not None:
|
||||
self.debug(err)
|
||||
super().addSubTest(test, subtest, err)
|
||||
|
||||
def debug(self, error):
|
||||
self._restoreStdout()
|
||||
self.buffer = False
|
||||
|
Loading…
x
Reference in New Issue
Block a user