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

Method run_python

Lib/test/test_subprocess.py:1795–1798  ·  view source on GitHub ↗

Run Python code in a subprocess using subprocess.run

(self, code, **kwargs)

Source from the content-addressed store, hash-verified

1793
1794class RunFuncTestCase(BaseTestCase):
1795 def run_python(self, code, **kwargs):
1796 """Run Python code in a subprocess using subprocess.run"""
1797 argv = [sys.executable, "-c", code]
1798 return subprocess.run(argv, **kwargs)
1799
1800 def test_returncode(self):
1801 # call() function with sequence argument

Callers 14

test_returncodeMethod · 0.95
test_checkMethod · 0.95
test_timeoutMethod · 0.95
test_capture_stdoutMethod · 0.95
test_capture_stderrMethod · 0.95
test_run_kwargsMethod · 0.95
test_capture_outputMethod · 0.95
test_stdout_stdoutMethod · 0.95

Calls 1

runMethod · 0.45

Tested by

no test coverage detected