Lines Matching refs:result
17 result = ['A traceback']
19 result.append('locals')
20 return result
23 unittest.result.traceback = traceback
38 self.result = ''
45 self.result += self.buffer
49 return self.result
63 result = unittest.TestResult()
65 self.assertTrue(result.wasSuccessful())
66 self.assertEqual(len(result.errors), 0)
67 self.assertEqual(len(result.failures), 0)
68 self.assertEqual(result.testsRun, 0)
69 self.assertEqual(result.shouldStop, False)
70 self.assertIsNone(result._stdout_buffer)
71 self.assertIsNone(result._stderr_buffer)
77 result = unittest.TestResult()
79 result.stop()
81 self.assertEqual(result.shouldStop, True)
92 result = unittest.TestResult()
94 result.startTest(test)
96 self.assertTrue(result.wasSuccessful())
97 self.assertEqual(len(result.errors), 0)
98 self.assertEqual(len(result.failures), 0)
99 self.assertEqual(result.testsRun, 1)
100 self.assertEqual(result.shouldStop, False)
102 result.stopTest(test)
113 result = unittest.TestResult()
115 result.startTest(test)
117 self.assertTrue(result.wasSuccessful())
118 self.assertEqual(len(result.errors), 0)
119 self.assertEqual(len(result.failures), 0)
120 self.assertEqual(result.testsRun, 1)
121 self.assertEqual(result.shouldStop, False)
123 result.stopTest(test)
126 self.assertTrue(result.wasSuccessful())
127 self.assertEqual(len(result.errors), 0)
128 self.assertEqual(len(result.failures), 0)
129 self.assertEqual(result.testsRun, 1)
130 self.assertEqual(result.shouldStop, False)
134 result = unittest.TestResult()
135 result.startTestRun()
136 result.stopTestRun()
164 result = unittest.TestResult()
166 result.startTest(test)
167 result.addSuccess(test)
168 result.stopTest(test)
170 self.assertTrue(result.wasSuccessful())
171 self.assertEqual(len(result.errors), 0)
172 self.assertEqual(len(result.failures), 0)
173 self.assertEqual(result.testsRun, 1)
174 self.assertEqual(result.shouldStop, False)
207 result = unittest.TestResult()
209 result.startTest(test)
210 result.addFailure(test, exc_info_tuple)
211 result.stopTest(test)
213 self.assertFalse(result.wasSuccessful())
214 self.assertEqual(len(result.errors), 0)
215 self.assertEqual(len(result.failures), 1)
216 self.assertEqual(result.testsRun, 1)
217 self.assertEqual(result.shouldStop, False)
219 test_case, formatted_exc = result.failures[0]
255 result = unittest.TestResult()
257 result.startTest(test)
258 result.addError(test, exc_info_tuple)
259 result.stopTest(test)
261 self.assertFalse(result.wasSuccessful())
262 self.assertEqual(len(result.errors), 1)
263 self.assertEqual(len(result.failures), 0)
264 self.assertEqual(result.testsRun, 1)
265 self.assertEqual(result.shouldStop, False)
267 test_case, formatted_exc = result.errors[0]
277 result = unittest.TestResult()
278 result.tb_locals = True
280 unittest.result.traceback = MockTraceback
282 result.startTestRun()
283 test.run(result)
284 result.stopTestRun()
286 self.assertEqual(len(result.errors), 1)
287 test_case, formatted_exc = result.errors[0]
301 result.addSubTest(test, subtest, exc_info_tuple)
307 result = unittest.TestResult()
309 test.run(result)
311 self.assertFalse(result.wasSuccessful())
312 self.assertEqual(len(result.errors), 1)
313 self.assertEqual(len(result.failures), 1)
314 self.assertEqual(result.testsRun, 1)
315 self.assertEqual(result.shouldStop, False)
317 test_case, formatted_exc = result.errors[0]
320 test_case, formatted_exc = result.failures[0]
325 result = unittest.TextTestResult(None, True, 1)
327 result.getDescription(self),
333 result = unittest.TextTestResult(None, True, 1)
335 result.getDescription(self._subtest),
339 result = unittest.TextTestResult(None, True, 1)
341 result.getDescription(self._subtest),
347 result = unittest.TextTestResult(None, True, 1)
349 result.getDescription(self._subtest),
355 result = unittest.TextTestResult(None, True, 1)
359 result.getDescription(self._subtest),
366 result = unittest.TextTestResult(None, True, 1)
368 result.getDescription(self._subtest),
375 result = unittest.TextTestResult(None, True, 1)
377 result.getDescription(self._subtest),
385 result = unittest.TextTestResult(None, True, 1)
387 result.getDescription(self),
396 result = unittest.TextTestResult(None, True, 1)
399 result.getDescription(self._subtest),
410 result = unittest.TextTestResult(None, True, 1)
412 result.getDescription(self),
424 result = unittest.TextTestResult(None, True, 1)
427 result.getDescription(self._subtest),
437 result = unittest.TestResult()
438 self.assertFalse(result._is_relevant_tb_level(Frame))
441 self.assertTrue(result._is_relevant_tb_level(Frame))
444 result = unittest.TestResult()
445 result._exc_info_to_string = lambda *_: ''
446 result.failfast = True
447 result.addError(None, None)
448 self.assertTrue(result.shouldStop)
450 result = unittest.TestResult()
451 result._exc_info_to_string = lambda *_: ''
452 result.failfast = True
453 result.addFailure(None, None)
454 self.assertTrue(result.shouldStop)
456 result = unittest.TestResult()
457 result._exc_info_to_string = lambda *_: ''
458 result.failfast = True
459 result.addUnexpectedSuccess(None)
460 self.assertTrue(result.shouldStop)
465 def test(result): argument
466 self.assertTrue(result.failfast)
467 result = runner.run(test)
493 result = OldResult()
494 test.run(result)
495 self.assertEqual(len(result.failures), failures)
554 result = unittest.TestResult()
555 self.assertFalse(result.buffer)
560 result.startTest(self)
569 result = unittest.TestResult()
570 self.assertFalse(result.buffer)
572 result.buffer = True
577 result.startTest(self)
588 result._original_stdout = io.StringIO()
589 result._original_stderr = io.StringIO()
597 self.assertEqual(result._original_stdout.getvalue(), '')
598 self.assertEqual(result._original_stderr.getvalue(), '')
600 result.addSuccess(self)
601 result.stopTest(self)
603 self.assertIs(sys.stdout, result._original_stdout)
604 self.assertIs(sys.stderr, result._original_stderr)
606 self.assertEqual(result._original_stdout.getvalue(), '')
607 self.assertEqual(result._original_stderr.getvalue(), '')
614 result = unittest.TestResult()
615 result.buffer = True
616 result.startTest(self)
617 return result
620 unittest.result.traceback = MockTraceback
629 result = self.getStartedResult()
632 result._original_stdout = io.StringIO()
633 result._original_stderr = io.StringIO()
640 addFunction = getattr(result, add_attr)
642 result.stopTest(self)
644 result_list = getattr(result, message_attr)
662 self.assertEqual(result._original_stdout.getvalue(), expectedOutMessage)
663 self.assertEqual(result._original_stderr.getvalue(), expectedErrMessage)
668 result = unittest.TestResult()
669 result.buffer = True
678 suite(result)
681 self.assertEqual(len(result.errors), 1)
683 test_case, formatted_exc = result.errors[0]
690 result = unittest.TestResult()
691 result.buffer = True
700 suite(result)
703 self.assertEqual(len(result.errors), 1)
705 test_case, formatted_exc = result.errors[0]
712 result = unittest.TestResult()
713 result.buffer = True
723 suite(result)
726 self.assertEqual(len(result.errors), 2)
728 test_case, formatted_exc = result.errors[0]
733 test_case, formatted_exc = result.errors[1]
741 result = unittest.TestResult()
742 result.buffer = True
753 suite(result)
756 self.assertEqual(len(result.errors), 3)
758 test_case, formatted_exc = result.errors[0]
764 test_case, formatted_exc = result.errors[1]
770 test_case, formatted_exc = result.errors[2]
779 result = unittest.TestResult()
780 result.buffer = True
793 suite(result)
796 self.assertEqual(len(result.errors), 3)
798 test_case, formatted_exc = result.errors[0]
804 test_case, formatted_exc = result.errors[1]
810 test_case, formatted_exc = result.errors[2]
819 result = unittest.TestResult()
820 result.buffer = True
830 suite(result)
833 self.assertEqual(len(result.errors), 1)
835 test_case, formatted_exc = result.errors[0]
842 result = unittest.TestResult()
843 result.buffer = True
853 suite(result)
856 self.assertEqual(len(result.errors), 1)
858 test_case, formatted_exc = result.errors[0]
865 result = unittest.TestResult()
866 result.buffer = True
880 suite(result)
883 self.assertEqual(len(result.errors), 2)
885 test_case, formatted_exc = result.errors[0]
890 test_case, formatted_exc = result.errors[1]
898 result = unittest.TestResult()
899 result.buffer = True
911 suite(result)
914 self.assertEqual(len(result.errors), 3)
916 test_case, formatted_exc = result.errors[0]
922 test_case, formatted_exc = result.errors[1]
928 test_case, formatted_exc = result.errors[2]
937 result = unittest.TestResult()
938 result.buffer = True
953 suite(result)
956 self.assertEqual(len(result.errors), 3)
958 test_case, formatted_exc = result.errors[0]
964 test_case, formatted_exc = result.errors[1]
970 test_case, formatted_exc = result.errors[2]
979 result = unittest.TestResult()
980 result.buffer = True
995 suite(result)
998 self.assertEqual(len(result.errors), 1)
1000 test_case, formatted_exc = result.errors[0]
1007 result = unittest.TestResult()
1008 result.buffer = True
1023 suite(result)
1026 self.assertEqual(len(result.errors), 1)
1028 test_case, formatted_exc = result.errors[0]
1035 result = unittest.TestResult()
1036 result.buffer = True
1052 suite(result)
1055 self.assertEqual(len(result.errors), 1)
1057 test_case, formatted_exc = result.errors[0]
1065 result = unittest.TestResult()
1066 result.buffer = True
1083 suite(result)
1086 self.assertEqual(len(result.errors), 2)
1088 test_case, formatted_exc = result.errors[0]
1094 test_case, formatted_exc = result.errors[1]
1104 result = unittest.TestResult()
1105 result.buffer = True
1125 suite(result)
1128 self.assertEqual(len(result.errors), 2)
1130 test_case, formatted_exc = result.errors[0]
1136 test_case, formatted_exc = result.errors[1]