(self)
| 130 | program.testNames) |
| 131 | |
| 132 | def test_NonExit(self): |
| 133 | stream = BufferedWriter() |
| 134 | program = unittest.main(exit=False, |
| 135 | argv=["foobar"], |
| 136 | testRunner=unittest.TextTestRunner(stream=stream), |
| 137 | testLoader=self.TestLoader(self.FooBar)) |
| 138 | self.assertHasAttr(program, 'result') |
| 139 | out = stream.getvalue() |
| 140 | self.assertIn('\nFAIL: testFail ', out) |
| 141 | self.assertIn('\nERROR: testError ', out) |
| 142 | self.assertIn('\nUNEXPECTED SUCCESS: testUnexpectedSuccess ', out) |
| 143 | expected = ('\n\nFAILED (failures=1, errors=1, skipped=1, ' |
| 144 | 'expected failures=1, unexpected successes=1)\n') |
| 145 | self.assertEndsWith(out, expected) |
| 146 | |
| 147 | def test_Exit(self): |
| 148 | stream = BufferedWriter() |
nothing calls this directly
no test coverage detected