(self)
| 162 | self.assertEndsWith(out, expected) |
| 163 | |
| 164 | def test_ExitAsDefault(self): |
| 165 | stream = BufferedWriter() |
| 166 | with self.assertRaises(SystemExit): |
| 167 | unittest.main( |
| 168 | argv=["foobar"], |
| 169 | testRunner=unittest.TextTestRunner(stream=stream), |
| 170 | testLoader=self.TestLoader(self.FooBar)) |
| 171 | out = stream.getvalue() |
| 172 | self.assertIn('\nFAIL: testFail ', out) |
| 173 | self.assertIn('\nERROR: testError ', out) |
| 174 | self.assertIn('\nUNEXPECTED SUCCESS: testUnexpectedSuccess ', out) |
| 175 | expected = ('\n\nFAILED (failures=1, errors=1, skipped=1, ' |
| 176 | 'expected failures=1, unexpected successes=1)\n') |
| 177 | self.assertEndsWith(out, expected) |
| 178 | |
| 179 | def test_ExitSkippedSuite(self): |
| 180 | stream = BufferedWriter() |
nothing calls this directly
no test coverage detected