MCPcopy Index your code
hub / github.com/python/cpython / GUITestResult

Class GUITestResult

Tools/unittestgui/unittestgui.py:155–185  ·  view source on GitHub ↗

A TestResult that makes callbacks to its associated GUI TestRunner. Used by BaseGUITestRunner. Need not be created directly.

Source from the content-addressed store, hash-verified

153
154
155class GUITestResult(unittest.TestResult):
156 """A TestResult that makes callbacks to its associated GUI TestRunner.
157 Used by BaseGUITestRunner. Need not be created directly.
158 """
159 def __init__(self, callback):
160 unittest.TestResult.__init__(self)
161 self.callback = callback
162
163 def addError(self, test, err):
164 unittest.TestResult.addError(self, test, err)
165 self.callback.notifyTestErrored(test, err)
166
167 def addFailure(self, test, err):
168 unittest.TestResult.addFailure(self, test, err)
169 self.callback.notifyTestFailed(test, err)
170
171 def addSkip(self, test, reason):
172 super(GUITestResult,self).addSkip(test, reason)
173 self.callback.notifyTestSkipped(test, reason)
174
175 def addExpectedFailure(self, test, err):
176 super(GUITestResult,self).addExpectedFailure(test, err)
177 self.callback.notifyTestFailedExpectedly(test, err)
178
179 def stopTest(self, test):
180 unittest.TestResult.stopTest(self, test)
181 self.callback.notifyTestFinished(test)
182
183 def startTest(self, test):
184 unittest.TestResult.startTest(self, test)
185 self.callback.notifyTestStarted(test)
186
187
188class RollbackImporter:

Callers 1

runClickedMethod · 0.85

Calls

no outgoing calls

Tested by 1

runClickedMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…