39 @param err The error traceback |
39 @param err The error traceback |
40 """ |
40 """ |
41 TestResult.addFailure(self, test, err) |
41 TestResult.addFailure(self, test, err) |
42 tracebackLines = self._exc_info_to_string(err, test) |
42 tracebackLines = self._exc_info_to_string(err, test) |
43 self.parent.write('%s%s\n' % (ResponseUTTestFailed, |
43 self.parent.write('%s%s\n' % (ResponseUTTestFailed, |
44 unicode((unicode(test), tracebackLines)))) |
44 unicode((unicode(test), tracebackLines, test.id())))) |
45 |
45 |
46 def addError(self, test, err): |
46 def addError(self, test, err): |
47 """ |
47 """ |
48 Method called if a test errored. |
48 Method called if a test errored. |
49 |
49 |
51 @param err The error traceback |
51 @param err The error traceback |
52 """ |
52 """ |
53 TestResult.addError(self, test, err) |
53 TestResult.addError(self, test, err) |
54 tracebackLines = self._exc_info_to_string(err, test) |
54 tracebackLines = self._exc_info_to_string(err, test) |
55 self.parent.write('%s%s\n' % (ResponseUTTestErrored, |
55 self.parent.write('%s%s\n' % (ResponseUTTestErrored, |
56 unicode((unicode(test), tracebackLines)))) |
56 unicode((unicode(test), tracebackLines, test.id())))) |
57 |
57 |
58 def addSkip(self, test, reason): |
58 def addSkip(self, test, reason): |
59 """ |
59 """ |
60 Method called if a test was skipped. |
60 Method called if a test was skipped. |
61 |
61 |
62 @param test reference to the test object |
62 @param test reference to the test object |
63 @param reason reason for skipping the test (string) |
63 @param reason reason for skipping the test (string) |
64 """ |
64 """ |
65 TestResult.addSkip(self, test, reason) |
65 TestResult.addSkip(self, test, reason) |
66 self.parent.write('%s%s\n' % (ResponseUTTestSkipped, |
66 self.parent.write('%s%s\n' % (ResponseUTTestSkipped, |
67 str((str(test), reason)))) |
67 str((str(test), reason, test.id())))) |
68 |
68 |
69 def addExpectedFailure(self, test, err): |
69 def addExpectedFailure(self, test, err): |
70 """ |
70 """ |
71 Method called if a test failed expected. |
71 Method called if a test failed expected. |
72 |
72 |
74 @param err error traceback |
74 @param err error traceback |
75 """ |
75 """ |
76 TestResult.addExpectedFailure(self, test, err) |
76 TestResult.addExpectedFailure(self, test, err) |
77 tracebackLines = self._exc_info_to_string(err, test) |
77 tracebackLines = self._exc_info_to_string(err, test) |
78 self.parent.write('%s%s\n' % (ResponseUTTestFailedExpected, |
78 self.parent.write('%s%s\n' % (ResponseUTTestFailedExpected, |
79 str((str(test), tracebackLines)))) |
79 str((str(test), tracebackLines, test.id())))) |
80 |
80 |
81 def addUnexpectedSuccess(self, test): |
81 def addUnexpectedSuccess(self, test): |
82 """ |
82 """ |
83 Method called if a test succeeded expectedly. |
83 Method called if a test succeeded expectedly. |
84 |
84 |
85 @param test reference to the test object |
85 @param test reference to the test object |
86 """ |
86 """ |
87 TestResult.addUnexpectedSuccess(self, test) |
87 TestResult.addUnexpectedSuccess(self, test) |
88 self.parent.write('%s%s\n' % (ResponseUTTestSucceededUnexpected, str(test))) |
88 self.parent.write('%s%s\n' % (ResponseUTTestSucceededUnexpected, |
|
89 str((str(test), test.id())))) |
89 |
90 |
90 def startTest(self, test): |
91 def startTest(self, test): |
91 """ |
92 """ |
92 Method called at the start of a test. |
93 Method called at the start of a test. |
93 |
94 |