Lines Matching defs:Test
4 from test import test_support
42 # "Called when the test case test is about to be run. The default
49 test = Foo('test_1')
53 result.startTest(test)
61 result.stopTest(test)
63 # "Called after the test case test has been executed, regardless of
70 test = Foo('test_1')
74 result.startTest(test)
82 result.stopTest(test)
97 # "addSuccess(test)"
99 # "Called when the test case test succeeds"
107 # formatted tracebacks. Each tuple represents a test which raised an
112 # formatted tracebacks. Each tuple represents a test where a failure was
121 test = Foo('test_1')
125 result.startTest(test)
126 result.addSuccess(test)
127 result.stopTest(test)
135 # "addFailure(test, err)"
137 # "Called when the test case test signals a failure. err is a tuple of
146 # formatted tracebacks. Each tuple represents a test which raised an
151 # formatted tracebacks. Each tuple represents a test where a failure was
160 test = Foo('test_1')
162 test.fail("foo")
168 result.startTest(test)
169 result.addFailure(test, exc_info_tuple)
170 result.stopTest(test)
179 self.assertIs(test_case, test)
182 # "addError(test, err)"
184 # "Called when the test case test raises an unexpected exception err
194 # formatted tracebacks. Each tuple represents a test which raised an
199 # formatted tracebacks. Each tuple represents a test where a failure was
208 test = Foo('test_1')
216 result.startTest(test)
217 result.addError(test, exc_info_tuple)
218 result.stopTest(test)
227 self.assertIs(test_case, test)
293 def test(result):
295 runner.run(test)
315 def assertOldResultWarning(self, test, failures):
319 test.run(result)
323 class Test(unittest.TestCase):
336 test = Test(test_name)
337 self.assertOldResultWarning(test, int(not should_pass))
340 class Test(unittest.TestCase):
345 self.assertOldResultWarning(Test('testFoo'), 0)
349 class Test(unittest.TestCase):
352 self.assertOldResultWarning(Test('testFoo'), 0)
355 class Test(unittest.TestCase):
361 # test result objects
362 runner.run(Test('testFoo'))
481 test, message = result_list[0]
494 self.assertIs(test, self)