DebugClients/Python/DCTestResult.py

changeset 3591
2f2a4a76dd22
parent 3160
209a07d7e401
child 3670
f0cb7579c0b4
equal deleted inserted replaced
3590:5280e37405b8 3591:2f2a4a76dd22
31 TestResult.__init__(self) 31 TestResult.__init__(self)
32 self.parent = parent 32 self.parent = parent
33 33
34 def addFailure(self, test, err): 34 def addFailure(self, test, err):
35 """ 35 """
36 Method called if a test failed. 36 Public method called if a test failed.
37 37
38 @param test Reference to the test object 38 @param test Reference to the test object
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)
45 ResponseUTTestFailed, 45 ResponseUTTestFailed,
46 unicode((unicode(test), tracebackLines, test.id())))) 46 unicode((unicode(test), tracebackLines, test.id()))))
47 47
48 def addError(self, test, err): 48 def addError(self, test, err):
49 """ 49 """
50 Method called if a test errored. 50 Public method called if a test errored.
51 51
52 @param test Reference to the test object 52 @param test Reference to the test object
53 @param err The error traceback 53 @param err The error traceback
54 """ 54 """
55 TestResult.addError(self, test, err) 55 TestResult.addError(self, test, err)
59 ResponseUTTestErrored, 59 ResponseUTTestErrored,
60 unicode((unicode(test), tracebackLines, test.id())))) 60 unicode((unicode(test), tracebackLines, test.id()))))
61 61
62 def addSkip(self, test, reason): 62 def addSkip(self, test, reason):
63 """ 63 """
64 Method called if a test was skipped. 64 Public method called if a test was skipped.
65 65
66 @param test reference to the test object 66 @param test reference to the test object
67 @param reason reason for skipping the test (string) 67 @param reason reason for skipping the test (string)
68 """ 68 """
69 TestResult.addSkip(self, test, reason) 69 TestResult.addSkip(self, test, reason)
72 ResponseUTTestSkipped, 72 ResponseUTTestSkipped,
73 str((str(test), reason, test.id())))) 73 str((str(test), reason, test.id()))))
74 74
75 def addExpectedFailure(self, test, err): 75 def addExpectedFailure(self, test, err):
76 """ 76 """
77 Method called if a test failed expected. 77 Public method called if a test failed expected.
78 78
79 @param test reference to the test object 79 @param test reference to the test object
80 @param err error traceback 80 @param err error traceback
81 """ 81 """
82 TestResult.addExpectedFailure(self, test, err) 82 TestResult.addExpectedFailure(self, test, err)
86 ResponseUTTestFailedExpected, 86 ResponseUTTestFailedExpected,
87 str((str(test), tracebackLines, test.id())))) 87 str((str(test), tracebackLines, test.id()))))
88 88
89 def addUnexpectedSuccess(self, test): 89 def addUnexpectedSuccess(self, test):
90 """ 90 """
91 Method called if a test succeeded expectedly. 91 Public method called if a test succeeded expectedly.
92 92
93 @param test reference to the test object 93 @param test reference to the test object
94 """ 94 """
95 TestResult.addUnexpectedSuccess(self, test) 95 TestResult.addUnexpectedSuccess(self, test)
96 self.parent.write( 96 self.parent.write(
98 ResponseUTTestSucceededUnexpected, 98 ResponseUTTestSucceededUnexpected,
99 str((str(test), test.id())))) 99 str((str(test), test.id()))))
100 100
101 def startTest(self, test): 101 def startTest(self, test):
102 """ 102 """
103 Method called at the start of a test. 103 Public method called at the start of a test.
104 104
105 @param test Reference to the test object 105 @param test Reference to the test object
106 """ 106 """
107 TestResult.startTest(self, test) 107 TestResult.startTest(self, test)
108 self.parent.write( 108 self.parent.write(
110 ResponseUTStartTest, 110 ResponseUTStartTest,
111 unicode((unicode(test), test.shortDescription())))) 111 unicode((unicode(test), test.shortDescription()))))
112 112
113 def stopTest(self, test): 113 def stopTest(self, test):
114 """ 114 """
115 Method called at the end of a test. 115 Public method called at the end of a test.
116 116
117 @param test Reference to the test object 117 @param test Reference to the test object
118 """ 118 """
119 TestResult.stopTest(self, test) 119 TestResult.stopTest(self, test)
120 self.parent.write('%s\n' % ResponseUTStopTest) 120 self.parent.write('%s\n' % ResponseUTStopTest)

eric ide

mercurial