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

Method test_assert_python_failure

Lib/test/test_script_helper.py:17–20  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

15 self.assertEqual(0, t[0], 'return code was not 0')
16
17 def test_assert_python_failure(self):
18 # I didn't import the sys module so this child will fail.
19 rc, out, err = script_helper.assert_python_failure('-c', 'sys.exit(0)')
20 self.assertNotEqual(0, rc, 'return code should not be 0')
21
22 def test_assert_python_ok_raises(self):
23 # I didn't import the sys module so this child will fail.

Callers

nothing calls this directly

Calls 2

assert_python_failureMethod · 0.80
assertNotEqualMethod · 0.80

Tested by

no test coverage detected