mirror of
https://github.com/django/django.git
synced 2025-08-03 02:23:12 +00:00
Fixed #33149 -- Made test runner --pdb option work with subTest().
Thanks Lucidot for the report and Mariusz Felisiak for the initial patch.
This commit is contained in:
parent
aa0d796e37
commit
7872971dfb
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue