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

Method test_returncode

Lib/test/test_subprocess.py:1800–1805  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1798 return subprocess.run(argv, **kwargs)
1799
1800 def test_returncode(self):
1801 # call() function with sequence argument
1802 cp = self.run_python("import sys; sys.exit(47)")
1803 self.assertEqual(cp.returncode, 47)
1804 with self.assertRaises(subprocess.CalledProcessError):
1805 cp.check_returncode()
1806
1807 def test_check(self):
1808 with self.assertRaises(subprocess.CalledProcessError) as c:

Callers

nothing calls this directly

Calls 4

run_pythonMethod · 0.95
check_returncodeMethod · 0.80
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected