A TestResult that makes callbacks to its associated GUI TestRunner. Used by BaseGUITestRunner. Need not be created directly.
| 153 | |
| 154 | |
| 155 | class 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 | |
| 188 | class RollbackImporter: |
no outgoing calls
searching dependent graphs…