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

Method check_exit_message

Lib/test/test_sys.py:267–271  ·  view source on GitHub ↗
(code, expected, **env_vars)

Source from the content-addressed store, hash-verified

265 self.assertEqual(err, b'')
266
267 def check_exit_message(code, expected, **env_vars):
268 rc, out, err = assert_python_failure('-c', code, **env_vars)
269 self.assertEqual(rc, 1)
270 self.assertEqual(out, b'')
271 self.assertStartsWith(err, expected)
272
273 # test that stderr buffer is flushed before the exit message is written
274 # into stderr

Callers

nothing calls this directly

Calls 3

assert_python_failureFunction · 0.90
assertStartsWithMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected