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

Method running_from_capi

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

Source from the content-addressed store, hash-verified

658 @requires_test_modules
659 @contextlib.contextmanager
660 def running_from_capi(self, interpid, *, main=False):
661 def run_interp(script):
662 text = self.run_from_capi(interpid, script, main=main)
663 assert text == '', repr(text)
664 def exec_interp(script):
665 rc = _testinternalcapi.exec_interpreter(interpid, script)
666 assert rc == 0, rc
667 with self._running(run_interp, exec_interp):
668 yield
669
670 @requires_test_modules
671 def run_temp_from_capi(self, script, config='legacy'):

Callers 3

test_is_runningMethod · 0.80

Calls 1

_runningMethod · 0.95

Tested by 3

test_is_runningMethod · 0.64