#33149: Make --pdb work with subTest().
-----------------------------------+------------------------------------
     Reporter:  Lucidiot           |                    Owner:  Abhyudai
         Type:  Bug                |                   Status:  assigned
    Component:  Testing framework  |                  Version:  3.2
     Severity:  Normal             |               Resolution:
     Keywords:                     |             Triage Stage:  Accepted
    Has patch:  0                  |      Needs documentation:  0
  Needs tests:  0                  |  Patch needs improvement:  0
Easy pickings:  0                  |                    UI/UX:  0
-----------------------------------+------------------------------------

Comment (by Lucidiot):

 No, I added the method to the PDBDebugResult directly:

 {{{
 diff --git a/django/test/runner.py b/django/test/runner.py
 index 225bc19b09..b4dd974d57 100644
 --- a/django/test/runner.py
 +++ b/django/test/runner.py
 @@ -107,6 +107,10 @@ class PDBDebugResult(unittest.TextTestResult):
          super().addFailure(test, err)
          self.debug(err)

 +    def addSubTest(self, test, subtest, err):
 +        super().addSubTest(test, subtest, err)
 +        self.debug(err)
 +
      def debug(self, error):
          self._restoreStdout()
          self.buffer = False
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33149#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.50471969812434b1a33dd56d9b7ca5e7%40djangoproject.com.

Reply via email to