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

Method test_ExitEmptySuite

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

Source from the content-addressed store, hash-verified

189 self.assertEndsWith(out, expected)
190
191 def test_ExitEmptySuite(self):
192 stream = BufferedWriter()
193 with self.assertRaises(SystemExit) as cm:
194 unittest.main(
195 argv=["empty"],
196 testRunner=unittest.TextTestRunner(stream=stream),
197 testLoader=self.TestLoader(self.Empty))
198 self.assertEqual(cm.exception.code, 5)
199 out = stream.getvalue()
200 self.assertIn('\nNO TESTS RAN\n', out)
201
202 def test_ExitSetUpClassFailureSuite(self):
203 stream = BufferedWriter()

Callers

nothing calls this directly

Calls 6

getvalueMethod · 0.95
assertInMethod · 0.80
BufferedWriterClass · 0.70
assertRaisesMethod · 0.45
mainMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected