MCPcopy Index your code
hub / github.com/python/cpython / test_NonExit

Method test_NonExit

Lib/test/test_unittest/test_program.py:132–145  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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()

Callers

nothing calls this directly

Calls 6

getvalueMethod · 0.95
assertHasAttrMethod · 0.80
assertInMethod · 0.80
assertEndsWithMethod · 0.80
BufferedWriterClass · 0.70
mainMethod · 0.45

Tested by

no test coverage detected