Commits

Michael Foord committed 00e73f2

Adding clean method to StopTestEvent

  • Participants
  • Parent commits d34125d
  • Branches plugins

Comments (0)

Files changed (2)

unittest2/events.py

                    (standardOutcome,))
             raise ValueError(msg)
 
+    def clean(self):
+        self.test = None
+        self.exc_info = None
+        self.result = None
+        
 
 class PluginsLoadedEvent(_Event):
     loadedPlugins = loadedPlugins

unittest2/runner.py

             self.stream.write(report.shortResult)
             self.stream.flush()
 
+        # remove references to test/result/exception from report
+        report.clean()
+
     def startTest(self, test):
         self._reported = True
         super(TextTestResult, self).startTest(test)