• Home
  • Raw
  • Download

Lines Matching refs:result

16             result = ['A traceback']
18 result.append('locals')
19 return result
22 unittest.result.traceback = traceback
36 result = unittest.TestResult()
38 self.assertTrue(result.wasSuccessful())
39 self.assertEqual(len(result.errors), 0)
40 self.assertEqual(len(result.failures), 0)
41 self.assertEqual(result.testsRun, 0)
42 self.assertEqual(result.shouldStop, False)
43 self.assertIsNone(result._stdout_buffer)
44 self.assertIsNone(result._stderr_buffer)
50 result = unittest.TestResult()
52 result.stop()
54 self.assertEqual(result.shouldStop, True)
65 result = unittest.TestResult()
67 result.startTest(test)
69 self.assertTrue(result.wasSuccessful())
70 self.assertEqual(len(result.errors), 0)
71 self.assertEqual(len(result.failures), 0)
72 self.assertEqual(result.testsRun, 1)
73 self.assertEqual(result.shouldStop, False)
75 result.stopTest(test)
86 result = unittest.TestResult()
88 result.startTest(test)
90 self.assertTrue(result.wasSuccessful())
91 self.assertEqual(len(result.errors), 0)
92 self.assertEqual(len(result.failures), 0)
93 self.assertEqual(result.testsRun, 1)
94 self.assertEqual(result.shouldStop, False)
96 result.stopTest(test)
99 self.assertTrue(result.wasSuccessful())
100 self.assertEqual(len(result.errors), 0)
101 self.assertEqual(len(result.failures), 0)
102 self.assertEqual(result.testsRun, 1)
103 self.assertEqual(result.shouldStop, False)
107 result = unittest.TestResult()
108 result.startTestRun()
109 result.stopTestRun()
137 result = unittest.TestResult()
139 result.startTest(test)
140 result.addSuccess(test)
141 result.stopTest(test)
143 self.assertTrue(result.wasSuccessful())
144 self.assertEqual(len(result.errors), 0)
145 self.assertEqual(len(result.failures), 0)
146 self.assertEqual(result.testsRun, 1)
147 self.assertEqual(result.shouldStop, False)
180 result = unittest.TestResult()
182 result.startTest(test)
183 result.addFailure(test, exc_info_tuple)
184 result.stopTest(test)
186 self.assertFalse(result.wasSuccessful())
187 self.assertEqual(len(result.errors), 0)
188 self.assertEqual(len(result.failures), 1)
189 self.assertEqual(result.testsRun, 1)
190 self.assertEqual(result.shouldStop, False)
192 test_case, formatted_exc = result.failures[0]
228 result = unittest.TestResult()
230 result.startTest(test)
231 result.addError(test, exc_info_tuple)
232 result.stopTest(test)
234 self.assertFalse(result.wasSuccessful())
235 self.assertEqual(len(result.errors), 1)
236 self.assertEqual(len(result.failures), 0)
237 self.assertEqual(result.testsRun, 1)
238 self.assertEqual(result.shouldStop, False)
240 test_case, formatted_exc = result.errors[0]
250 result = unittest.TestResult()
251 result.tb_locals = True
253 unittest.result.traceback = MockTraceback
255 result.startTestRun()
256 test.run(result)
257 result.stopTestRun()
259 self.assertEqual(len(result.errors), 1)
260 test_case, formatted_exc = result.errors[0]
274 result.addSubTest(test, subtest, exc_info_tuple)
280 result = unittest.TestResult()
282 test.run(result)
284 self.assertFalse(result.wasSuccessful())
285 self.assertEqual(len(result.errors), 1)
286 self.assertEqual(len(result.failures), 1)
287 self.assertEqual(result.testsRun, 1)
288 self.assertEqual(result.shouldStop, False)
290 test_case, formatted_exc = result.errors[0]
293 test_case, formatted_exc = result.failures[0]
298 result = unittest.TextTestResult(None, True, 1)
300 result.getDescription(self),
306 result = unittest.TextTestResult(None, True, 1)
308 result.getDescription(self._subtest),
312 result = unittest.TextTestResult(None, True, 1)
314 result.getDescription(self._subtest),
320 result = unittest.TextTestResult(None, True, 1)
322 result.getDescription(self._subtest),
328 result = unittest.TextTestResult(None, True, 1)
332 result.getDescription(self._subtest),
339 result = unittest.TextTestResult(None, True, 1)
341 result.getDescription(self._subtest),
348 result = unittest.TextTestResult(None, True, 1)
350 result.getDescription(self._subtest),
358 result = unittest.TextTestResult(None, True, 1)
360 result.getDescription(self),
369 result = unittest.TextTestResult(None, True, 1)
372 result.getDescription(self._subtest),
383 result = unittest.TextTestResult(None, True, 1)
385 result.getDescription(self),
397 result = unittest.TextTestResult(None, True, 1)
400 result.getDescription(self._subtest),
410 result = unittest.TestResult()
411 self.assertFalse(result._is_relevant_tb_level(Frame))
414 self.assertTrue(result._is_relevant_tb_level(Frame))
417 result = unittest.TestResult()
418 result._exc_info_to_string = lambda *_: ''
419 result.failfast = True
420 result.addError(None, None)
421 self.assertTrue(result.shouldStop)
423 result = unittest.TestResult()
424 result._exc_info_to_string = lambda *_: ''
425 result.failfast = True
426 result.addFailure(None, None)
427 self.assertTrue(result.shouldStop)
429 result = unittest.TestResult()
430 result._exc_info_to_string = lambda *_: ''
431 result.failfast = True
432 result.addUnexpectedSuccess(None)
433 self.assertTrue(result.shouldStop)
437 def test(result): argument
438 self.assertTrue(result.failfast)
439 result = runner.run(test)
463 result = OldResult()
464 test.run(result)
465 self.assertEqual(len(result.failures), failures)
524 result = unittest.TestResult()
525 self.assertFalse(result.buffer)
530 result.startTest(self)
539 result = unittest.TestResult()
540 self.assertFalse(result.buffer)
542 result.buffer = True
547 result.startTest(self)
558 result._original_stdout = io.StringIO()
559 result._original_stderr = io.StringIO()
567 self.assertEqual(result._original_stdout.getvalue(), '')
568 self.assertEqual(result._original_stderr.getvalue(), '')
570 result.addSuccess(self)
571 result.stopTest(self)
573 self.assertIs(sys.stdout, result._original_stdout)
574 self.assertIs(sys.stderr, result._original_stderr)
576 self.assertEqual(result._original_stdout.getvalue(), '')
577 self.assertEqual(result._original_stderr.getvalue(), '')
584 result = unittest.TestResult()
585 result.buffer = True
586 result.startTest(self)
587 return result
590 unittest.result.traceback = MockTraceback
599 result = self.getStartedResult()
602 result._original_stdout = io.StringIO()
603 result._original_stderr = io.StringIO()
610 addFunction = getattr(result, add_attr)
612 result.stopTest(self)
614 result_list = getattr(result, message_attr)
632 self.assertEqual(result._original_stdout.getvalue(), expectedOutMessage)
633 self.assertEqual(result._original_stderr.getvalue(), expectedErrMessage)
637 result = unittest.TestResult()
638 result.buffer = True
647 suite(result)
648 self.assertEqual(len(result.errors), 1)
651 result = unittest.TestResult()
652 result.buffer = True
661 suite(result)
662 self.assertEqual(len(result.errors), 1)
665 result = unittest.TestResult()
666 result.buffer = True
680 suite(result)
681 self.assertEqual(len(result.errors), 1)
684 result = unittest.TestResult()
685 result.buffer = True
699 suite(result)
700 self.assertEqual(len(result.errors), 1)