1 | n/a | import unittest |
---|
2 | n/a | |
---|
3 | n/a | import gc |
---|
4 | n/a | import sys |
---|
5 | n/a | import weakref |
---|
6 | n/a | from unittest.test.support import LoggingResult, TestEquality |
---|
7 | n/a | |
---|
8 | n/a | |
---|
9 | n/a | ### Support code for Test_TestSuite |
---|
10 | n/a | ################################################################ |
---|
11 | n/a | |
---|
12 | n/a | class Test(object): |
---|
13 | n/a | class Foo(unittest.TestCase): |
---|
14 | n/a | def test_1(self): pass |
---|
15 | n/a | def test_2(self): pass |
---|
16 | n/a | def test_3(self): pass |
---|
17 | n/a | def runTest(self): pass |
---|
18 | n/a | |
---|
19 | n/a | def _mk_TestSuite(*names): |
---|
20 | n/a | return unittest.TestSuite(Test.Foo(n) for n in names) |
---|
21 | n/a | |
---|
22 | n/a | ################################################################ |
---|
23 | n/a | |
---|
24 | n/a | |
---|
25 | n/a | class Test_TestSuite(unittest.TestCase, TestEquality): |
---|
26 | n/a | |
---|
27 | n/a | ### Set up attributes needed by inherited tests |
---|
28 | n/a | ################################################################ |
---|
29 | n/a | |
---|
30 | n/a | # Used by TestEquality.test_eq |
---|
31 | n/a | eq_pairs = [(unittest.TestSuite(), unittest.TestSuite()) |
---|
32 | n/a | ,(unittest.TestSuite(), unittest.TestSuite([])) |
---|
33 | n/a | ,(_mk_TestSuite('test_1'), _mk_TestSuite('test_1'))] |
---|
34 | n/a | |
---|
35 | n/a | # Used by TestEquality.test_ne |
---|
36 | n/a | ne_pairs = [(unittest.TestSuite(), _mk_TestSuite('test_1')) |
---|
37 | n/a | ,(unittest.TestSuite([]), _mk_TestSuite('test_1')) |
---|
38 | n/a | ,(_mk_TestSuite('test_1', 'test_2'), _mk_TestSuite('test_1', 'test_3')) |
---|
39 | n/a | ,(_mk_TestSuite('test_1'), _mk_TestSuite('test_2'))] |
---|
40 | n/a | |
---|
41 | n/a | ################################################################ |
---|
42 | n/a | ### /Set up attributes needed by inherited tests |
---|
43 | n/a | |
---|
44 | n/a | ### Tests for TestSuite.__init__ |
---|
45 | n/a | ################################################################ |
---|
46 | n/a | |
---|
47 | n/a | # "class TestSuite([tests])" |
---|
48 | n/a | # |
---|
49 | n/a | # The tests iterable should be optional |
---|
50 | n/a | def test_init__tests_optional(self): |
---|
51 | n/a | suite = unittest.TestSuite() |
---|
52 | n/a | |
---|
53 | n/a | self.assertEqual(suite.countTestCases(), 0) |
---|
54 | n/a | # countTestCases() still works after tests are run |
---|
55 | n/a | suite.run(unittest.TestResult()) |
---|
56 | n/a | self.assertEqual(suite.countTestCases(), 0) |
---|
57 | n/a | |
---|
58 | n/a | # "class TestSuite([tests])" |
---|
59 | n/a | # ... |
---|
60 | n/a | # "If tests is given, it must be an iterable of individual test cases |
---|
61 | n/a | # or other test suites that will be used to build the suite initially" |
---|
62 | n/a | # |
---|
63 | n/a | # TestSuite should deal with empty tests iterables by allowing the |
---|
64 | n/a | # creation of an empty suite |
---|
65 | n/a | def test_init__empty_tests(self): |
---|
66 | n/a | suite = unittest.TestSuite([]) |
---|
67 | n/a | |
---|
68 | n/a | self.assertEqual(suite.countTestCases(), 0) |
---|
69 | n/a | # countTestCases() still works after tests are run |
---|
70 | n/a | suite.run(unittest.TestResult()) |
---|
71 | n/a | self.assertEqual(suite.countTestCases(), 0) |
---|
72 | n/a | |
---|
73 | n/a | # "class TestSuite([tests])" |
---|
74 | n/a | # ... |
---|
75 | n/a | # "If tests is given, it must be an iterable of individual test cases |
---|
76 | n/a | # or other test suites that will be used to build the suite initially" |
---|
77 | n/a | # |
---|
78 | n/a | # TestSuite should allow any iterable to provide tests |
---|
79 | n/a | def test_init__tests_from_any_iterable(self): |
---|
80 | n/a | def tests(): |
---|
81 | n/a | yield unittest.FunctionTestCase(lambda: None) |
---|
82 | n/a | yield unittest.FunctionTestCase(lambda: None) |
---|
83 | n/a | |
---|
84 | n/a | suite_1 = unittest.TestSuite(tests()) |
---|
85 | n/a | self.assertEqual(suite_1.countTestCases(), 2) |
---|
86 | n/a | |
---|
87 | n/a | suite_2 = unittest.TestSuite(suite_1) |
---|
88 | n/a | self.assertEqual(suite_2.countTestCases(), 2) |
---|
89 | n/a | |
---|
90 | n/a | suite_3 = unittest.TestSuite(set(suite_1)) |
---|
91 | n/a | self.assertEqual(suite_3.countTestCases(), 2) |
---|
92 | n/a | |
---|
93 | n/a | # countTestCases() still works after tests are run |
---|
94 | n/a | suite_1.run(unittest.TestResult()) |
---|
95 | n/a | self.assertEqual(suite_1.countTestCases(), 2) |
---|
96 | n/a | suite_2.run(unittest.TestResult()) |
---|
97 | n/a | self.assertEqual(suite_2.countTestCases(), 2) |
---|
98 | n/a | suite_3.run(unittest.TestResult()) |
---|
99 | n/a | self.assertEqual(suite_3.countTestCases(), 2) |
---|
100 | n/a | |
---|
101 | n/a | # "class TestSuite([tests])" |
---|
102 | n/a | # ... |
---|
103 | n/a | # "If tests is given, it must be an iterable of individual test cases |
---|
104 | n/a | # or other test suites that will be used to build the suite initially" |
---|
105 | n/a | # |
---|
106 | n/a | # Does TestSuite() also allow other TestSuite() instances to be present |
---|
107 | n/a | # in the tests iterable? |
---|
108 | n/a | def test_init__TestSuite_instances_in_tests(self): |
---|
109 | n/a | def tests(): |
---|
110 | n/a | ftc = unittest.FunctionTestCase(lambda: None) |
---|
111 | n/a | yield unittest.TestSuite([ftc]) |
---|
112 | n/a | yield unittest.FunctionTestCase(lambda: None) |
---|
113 | n/a | |
---|
114 | n/a | suite = unittest.TestSuite(tests()) |
---|
115 | n/a | self.assertEqual(suite.countTestCases(), 2) |
---|
116 | n/a | # countTestCases() still works after tests are run |
---|
117 | n/a | suite.run(unittest.TestResult()) |
---|
118 | n/a | self.assertEqual(suite.countTestCases(), 2) |
---|
119 | n/a | |
---|
120 | n/a | ################################################################ |
---|
121 | n/a | ### /Tests for TestSuite.__init__ |
---|
122 | n/a | |
---|
123 | n/a | # Container types should support the iter protocol |
---|
124 | n/a | def test_iter(self): |
---|
125 | n/a | test1 = unittest.FunctionTestCase(lambda: None) |
---|
126 | n/a | test2 = unittest.FunctionTestCase(lambda: None) |
---|
127 | n/a | suite = unittest.TestSuite((test1, test2)) |
---|
128 | n/a | |
---|
129 | n/a | self.assertEqual(list(suite), [test1, test2]) |
---|
130 | n/a | |
---|
131 | n/a | # "Return the number of tests represented by the this test object. |
---|
132 | n/a | # ...this method is also implemented by the TestSuite class, which can |
---|
133 | n/a | # return larger [greater than 1] values" |
---|
134 | n/a | # |
---|
135 | n/a | # Presumably an empty TestSuite returns 0? |
---|
136 | n/a | def test_countTestCases_zero_simple(self): |
---|
137 | n/a | suite = unittest.TestSuite() |
---|
138 | n/a | |
---|
139 | n/a | self.assertEqual(suite.countTestCases(), 0) |
---|
140 | n/a | |
---|
141 | n/a | # "Return the number of tests represented by the this test object. |
---|
142 | n/a | # ...this method is also implemented by the TestSuite class, which can |
---|
143 | n/a | # return larger [greater than 1] values" |
---|
144 | n/a | # |
---|
145 | n/a | # Presumably an empty TestSuite (even if it contains other empty |
---|
146 | n/a | # TestSuite instances) returns 0? |
---|
147 | n/a | def test_countTestCases_zero_nested(self): |
---|
148 | n/a | class Test1(unittest.TestCase): |
---|
149 | n/a | def test(self): |
---|
150 | n/a | pass |
---|
151 | n/a | |
---|
152 | n/a | suite = unittest.TestSuite([unittest.TestSuite()]) |
---|
153 | n/a | |
---|
154 | n/a | self.assertEqual(suite.countTestCases(), 0) |
---|
155 | n/a | |
---|
156 | n/a | # "Return the number of tests represented by the this test object. |
---|
157 | n/a | # ...this method is also implemented by the TestSuite class, which can |
---|
158 | n/a | # return larger [greater than 1] values" |
---|
159 | n/a | def test_countTestCases_simple(self): |
---|
160 | n/a | test1 = unittest.FunctionTestCase(lambda: None) |
---|
161 | n/a | test2 = unittest.FunctionTestCase(lambda: None) |
---|
162 | n/a | suite = unittest.TestSuite((test1, test2)) |
---|
163 | n/a | |
---|
164 | n/a | self.assertEqual(suite.countTestCases(), 2) |
---|
165 | n/a | # countTestCases() still works after tests are run |
---|
166 | n/a | suite.run(unittest.TestResult()) |
---|
167 | n/a | self.assertEqual(suite.countTestCases(), 2) |
---|
168 | n/a | |
---|
169 | n/a | # "Return the number of tests represented by the this test object. |
---|
170 | n/a | # ...this method is also implemented by the TestSuite class, which can |
---|
171 | n/a | # return larger [greater than 1] values" |
---|
172 | n/a | # |
---|
173 | n/a | # Make sure this holds for nested TestSuite instances, too |
---|
174 | n/a | def test_countTestCases_nested(self): |
---|
175 | n/a | class Test1(unittest.TestCase): |
---|
176 | n/a | def test1(self): pass |
---|
177 | n/a | def test2(self): pass |
---|
178 | n/a | |
---|
179 | n/a | test2 = unittest.FunctionTestCase(lambda: None) |
---|
180 | n/a | test3 = unittest.FunctionTestCase(lambda: None) |
---|
181 | n/a | child = unittest.TestSuite((Test1('test2'), test2)) |
---|
182 | n/a | parent = unittest.TestSuite((test3, child, Test1('test1'))) |
---|
183 | n/a | |
---|
184 | n/a | self.assertEqual(parent.countTestCases(), 4) |
---|
185 | n/a | # countTestCases() still works after tests are run |
---|
186 | n/a | parent.run(unittest.TestResult()) |
---|
187 | n/a | self.assertEqual(parent.countTestCases(), 4) |
---|
188 | n/a | self.assertEqual(child.countTestCases(), 2) |
---|
189 | n/a | |
---|
190 | n/a | # "Run the tests associated with this suite, collecting the result into |
---|
191 | n/a | # the test result object passed as result." |
---|
192 | n/a | # |
---|
193 | n/a | # And if there are no tests? What then? |
---|
194 | n/a | def test_run__empty_suite(self): |
---|
195 | n/a | events = [] |
---|
196 | n/a | result = LoggingResult(events) |
---|
197 | n/a | |
---|
198 | n/a | suite = unittest.TestSuite() |
---|
199 | n/a | |
---|
200 | n/a | suite.run(result) |
---|
201 | n/a | |
---|
202 | n/a | self.assertEqual(events, []) |
---|
203 | n/a | |
---|
204 | n/a | # "Note that unlike TestCase.run(), TestSuite.run() requires the |
---|
205 | n/a | # "result object to be passed in." |
---|
206 | n/a | def test_run__requires_result(self): |
---|
207 | n/a | suite = unittest.TestSuite() |
---|
208 | n/a | |
---|
209 | n/a | try: |
---|
210 | n/a | suite.run() |
---|
211 | n/a | except TypeError: |
---|
212 | n/a | pass |
---|
213 | n/a | else: |
---|
214 | n/a | self.fail("Failed to raise TypeError") |
---|
215 | n/a | |
---|
216 | n/a | # "Run the tests associated with this suite, collecting the result into |
---|
217 | n/a | # the test result object passed as result." |
---|
218 | n/a | def test_run(self): |
---|
219 | n/a | events = [] |
---|
220 | n/a | result = LoggingResult(events) |
---|
221 | n/a | |
---|
222 | n/a | class LoggingCase(unittest.TestCase): |
---|
223 | n/a | def run(self, result): |
---|
224 | n/a | events.append('run %s' % self._testMethodName) |
---|
225 | n/a | |
---|
226 | n/a | def test1(self): pass |
---|
227 | n/a | def test2(self): pass |
---|
228 | n/a | |
---|
229 | n/a | tests = [LoggingCase('test1'), LoggingCase('test2')] |
---|
230 | n/a | |
---|
231 | n/a | unittest.TestSuite(tests).run(result) |
---|
232 | n/a | |
---|
233 | n/a | self.assertEqual(events, ['run test1', 'run test2']) |
---|
234 | n/a | |
---|
235 | n/a | # "Add a TestCase ... to the suite" |
---|
236 | n/a | def test_addTest__TestCase(self): |
---|
237 | n/a | class Foo(unittest.TestCase): |
---|
238 | n/a | def test(self): pass |
---|
239 | n/a | |
---|
240 | n/a | test = Foo('test') |
---|
241 | n/a | suite = unittest.TestSuite() |
---|
242 | n/a | |
---|
243 | n/a | suite.addTest(test) |
---|
244 | n/a | |
---|
245 | n/a | self.assertEqual(suite.countTestCases(), 1) |
---|
246 | n/a | self.assertEqual(list(suite), [test]) |
---|
247 | n/a | # countTestCases() still works after tests are run |
---|
248 | n/a | suite.run(unittest.TestResult()) |
---|
249 | n/a | self.assertEqual(suite.countTestCases(), 1) |
---|
250 | n/a | |
---|
251 | n/a | # "Add a ... TestSuite to the suite" |
---|
252 | n/a | def test_addTest__TestSuite(self): |
---|
253 | n/a | class Foo(unittest.TestCase): |
---|
254 | n/a | def test(self): pass |
---|
255 | n/a | |
---|
256 | n/a | suite_2 = unittest.TestSuite([Foo('test')]) |
---|
257 | n/a | |
---|
258 | n/a | suite = unittest.TestSuite() |
---|
259 | n/a | suite.addTest(suite_2) |
---|
260 | n/a | |
---|
261 | n/a | self.assertEqual(suite.countTestCases(), 1) |
---|
262 | n/a | self.assertEqual(list(suite), [suite_2]) |
---|
263 | n/a | # countTestCases() still works after tests are run |
---|
264 | n/a | suite.run(unittest.TestResult()) |
---|
265 | n/a | self.assertEqual(suite.countTestCases(), 1) |
---|
266 | n/a | |
---|
267 | n/a | # "Add all the tests from an iterable of TestCase and TestSuite |
---|
268 | n/a | # instances to this test suite." |
---|
269 | n/a | # |
---|
270 | n/a | # "This is equivalent to iterating over tests, calling addTest() for |
---|
271 | n/a | # each element" |
---|
272 | n/a | def test_addTests(self): |
---|
273 | n/a | class Foo(unittest.TestCase): |
---|
274 | n/a | def test_1(self): pass |
---|
275 | n/a | def test_2(self): pass |
---|
276 | n/a | |
---|
277 | n/a | test_1 = Foo('test_1') |
---|
278 | n/a | test_2 = Foo('test_2') |
---|
279 | n/a | inner_suite = unittest.TestSuite([test_2]) |
---|
280 | n/a | |
---|
281 | n/a | def gen(): |
---|
282 | n/a | yield test_1 |
---|
283 | n/a | yield test_2 |
---|
284 | n/a | yield inner_suite |
---|
285 | n/a | |
---|
286 | n/a | suite_1 = unittest.TestSuite() |
---|
287 | n/a | suite_1.addTests(gen()) |
---|
288 | n/a | |
---|
289 | n/a | self.assertEqual(list(suite_1), list(gen())) |
---|
290 | n/a | |
---|
291 | n/a | # "This is equivalent to iterating over tests, calling addTest() for |
---|
292 | n/a | # each element" |
---|
293 | n/a | suite_2 = unittest.TestSuite() |
---|
294 | n/a | for t in gen(): |
---|
295 | n/a | suite_2.addTest(t) |
---|
296 | n/a | |
---|
297 | n/a | self.assertEqual(suite_1, suite_2) |
---|
298 | n/a | |
---|
299 | n/a | # "Add all the tests from an iterable of TestCase and TestSuite |
---|
300 | n/a | # instances to this test suite." |
---|
301 | n/a | # |
---|
302 | n/a | # What happens if it doesn't get an iterable? |
---|
303 | n/a | def test_addTest__noniterable(self): |
---|
304 | n/a | suite = unittest.TestSuite() |
---|
305 | n/a | |
---|
306 | n/a | try: |
---|
307 | n/a | suite.addTests(5) |
---|
308 | n/a | except TypeError: |
---|
309 | n/a | pass |
---|
310 | n/a | else: |
---|
311 | n/a | self.fail("Failed to raise TypeError") |
---|
312 | n/a | |
---|
313 | n/a | def test_addTest__noncallable(self): |
---|
314 | n/a | suite = unittest.TestSuite() |
---|
315 | n/a | self.assertRaises(TypeError, suite.addTest, 5) |
---|
316 | n/a | |
---|
317 | n/a | def test_addTest__casesuiteclass(self): |
---|
318 | n/a | suite = unittest.TestSuite() |
---|
319 | n/a | self.assertRaises(TypeError, suite.addTest, Test_TestSuite) |
---|
320 | n/a | self.assertRaises(TypeError, suite.addTest, unittest.TestSuite) |
---|
321 | n/a | |
---|
322 | n/a | def test_addTests__string(self): |
---|
323 | n/a | suite = unittest.TestSuite() |
---|
324 | n/a | self.assertRaises(TypeError, suite.addTests, "foo") |
---|
325 | n/a | |
---|
326 | n/a | def test_function_in_suite(self): |
---|
327 | n/a | def f(_): |
---|
328 | n/a | pass |
---|
329 | n/a | suite = unittest.TestSuite() |
---|
330 | n/a | suite.addTest(f) |
---|
331 | n/a | |
---|
332 | n/a | # when the bug is fixed this line will not crash |
---|
333 | n/a | suite.run(unittest.TestResult()) |
---|
334 | n/a | |
---|
335 | n/a | def test_remove_test_at_index(self): |
---|
336 | n/a | if not unittest.BaseTestSuite._cleanup: |
---|
337 | n/a | raise unittest.SkipTest("Suite cleanup is disabled") |
---|
338 | n/a | |
---|
339 | n/a | suite = unittest.TestSuite() |
---|
340 | n/a | |
---|
341 | n/a | suite._tests = [1, 2, 3] |
---|
342 | n/a | suite._removeTestAtIndex(1) |
---|
343 | n/a | |
---|
344 | n/a | self.assertEqual([1, None, 3], suite._tests) |
---|
345 | n/a | |
---|
346 | n/a | def test_remove_test_at_index_not_indexable(self): |
---|
347 | n/a | if not unittest.BaseTestSuite._cleanup: |
---|
348 | n/a | raise unittest.SkipTest("Suite cleanup is disabled") |
---|
349 | n/a | |
---|
350 | n/a | suite = unittest.TestSuite() |
---|
351 | n/a | suite._tests = None |
---|
352 | n/a | |
---|
353 | n/a | # if _removeAtIndex raises for noniterables this next line will break |
---|
354 | n/a | suite._removeTestAtIndex(2) |
---|
355 | n/a | |
---|
356 | n/a | def assert_garbage_collect_test_after_run(self, TestSuiteClass): |
---|
357 | n/a | if not unittest.BaseTestSuite._cleanup: |
---|
358 | n/a | raise unittest.SkipTest("Suite cleanup is disabled") |
---|
359 | n/a | |
---|
360 | n/a | class Foo(unittest.TestCase): |
---|
361 | n/a | def test_nothing(self): |
---|
362 | n/a | pass |
---|
363 | n/a | |
---|
364 | n/a | test = Foo('test_nothing') |
---|
365 | n/a | wref = weakref.ref(test) |
---|
366 | n/a | |
---|
367 | n/a | suite = TestSuiteClass([wref()]) |
---|
368 | n/a | suite.run(unittest.TestResult()) |
---|
369 | n/a | |
---|
370 | n/a | del test |
---|
371 | n/a | |
---|
372 | n/a | # for the benefit of non-reference counting implementations |
---|
373 | n/a | gc.collect() |
---|
374 | n/a | |
---|
375 | n/a | self.assertEqual(suite._tests, [None]) |
---|
376 | n/a | self.assertIsNone(wref()) |
---|
377 | n/a | |
---|
378 | n/a | def test_garbage_collect_test_after_run_BaseTestSuite(self): |
---|
379 | n/a | self.assert_garbage_collect_test_after_run(unittest.BaseTestSuite) |
---|
380 | n/a | |
---|
381 | n/a | def test_garbage_collect_test_after_run_TestSuite(self): |
---|
382 | n/a | self.assert_garbage_collect_test_after_run(unittest.TestSuite) |
---|
383 | n/a | |
---|
384 | n/a | def test_basetestsuite(self): |
---|
385 | n/a | class Test(unittest.TestCase): |
---|
386 | n/a | wasSetUp = False |
---|
387 | n/a | wasTornDown = False |
---|
388 | n/a | @classmethod |
---|
389 | n/a | def setUpClass(cls): |
---|
390 | n/a | cls.wasSetUp = True |
---|
391 | n/a | @classmethod |
---|
392 | n/a | def tearDownClass(cls): |
---|
393 | n/a | cls.wasTornDown = True |
---|
394 | n/a | def testPass(self): |
---|
395 | n/a | pass |
---|
396 | n/a | def testFail(self): |
---|
397 | n/a | fail |
---|
398 | n/a | class Module(object): |
---|
399 | n/a | wasSetUp = False |
---|
400 | n/a | wasTornDown = False |
---|
401 | n/a | @staticmethod |
---|
402 | n/a | def setUpModule(): |
---|
403 | n/a | Module.wasSetUp = True |
---|
404 | n/a | @staticmethod |
---|
405 | n/a | def tearDownModule(): |
---|
406 | n/a | Module.wasTornDown = True |
---|
407 | n/a | |
---|
408 | n/a | Test.__module__ = 'Module' |
---|
409 | n/a | sys.modules['Module'] = Module |
---|
410 | n/a | self.addCleanup(sys.modules.pop, 'Module') |
---|
411 | n/a | |
---|
412 | n/a | suite = unittest.BaseTestSuite() |
---|
413 | n/a | suite.addTests([Test('testPass'), Test('testFail')]) |
---|
414 | n/a | self.assertEqual(suite.countTestCases(), 2) |
---|
415 | n/a | |
---|
416 | n/a | result = unittest.TestResult() |
---|
417 | n/a | suite.run(result) |
---|
418 | n/a | self.assertFalse(Module.wasSetUp) |
---|
419 | n/a | self.assertFalse(Module.wasTornDown) |
---|
420 | n/a | self.assertFalse(Test.wasSetUp) |
---|
421 | n/a | self.assertFalse(Test.wasTornDown) |
---|
422 | n/a | self.assertEqual(len(result.errors), 1) |
---|
423 | n/a | self.assertEqual(len(result.failures), 0) |
---|
424 | n/a | self.assertEqual(result.testsRun, 2) |
---|
425 | n/a | self.assertEqual(suite.countTestCases(), 2) |
---|
426 | n/a | |
---|
427 | n/a | |
---|
428 | n/a | def test_overriding_call(self): |
---|
429 | n/a | class MySuite(unittest.TestSuite): |
---|
430 | n/a | called = False |
---|
431 | n/a | def __call__(self, *args, **kw): |
---|
432 | n/a | self.called = True |
---|
433 | n/a | unittest.TestSuite.__call__(self, *args, **kw) |
---|
434 | n/a | |
---|
435 | n/a | suite = MySuite() |
---|
436 | n/a | result = unittest.TestResult() |
---|
437 | n/a | wrapper = unittest.TestSuite() |
---|
438 | n/a | wrapper.addTest(suite) |
---|
439 | n/a | wrapper(result) |
---|
440 | n/a | self.assertTrue(suite.called) |
---|
441 | n/a | |
---|
442 | n/a | # reusing results should be permitted even if abominable |
---|
443 | n/a | self.assertFalse(result._testRunEntered) |
---|
444 | n/a | |
---|
445 | n/a | |
---|
446 | n/a | if __name__ == '__main__': |
---|
447 | n/a | unittest.main() |
---|