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

Method run_from_capi

Lib/test/test_interpreters/utils.py:572–577  ·  view source on GitHub ↗
(self, interpid, script, *, main=False)

Source from the content-addressed store, hash-verified

570
571 @requires_test_modules
572 def run_from_capi(self, interpid, script, *, main=False):
573 with self.capturing(script) as (wrapped, results):
574 rc = _testinternalcapi.exec_interpreter(interpid, wrapped, main=main)
575 assert rc == 0, rc
576 results.raise_if_failed()
577 return results.stdout
578
579 @contextlib.contextmanager
580 def _running(self, run_interp, exec_interp):

Callers 4

run_interpMethod · 0.95

Calls 2

capturingMethod · 0.95
raise_if_failedMethod · 0.80

Tested by 3