MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_NonExit

Method test_NonExit

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected