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

Method _run_string

Lib/test/test_interpreters/utils.py:494–504  ·  view source on GitHub ↗
(self, interp, script)

Source from the content-addressed store, hash-verified

492 self.fail(self._formatMessage(msg, standardMsg))
493
494 def _run_string(self, interp, script):
495 wrapped, results = _captured_script(script, exc=False)
496 #_dump_script(wrapped)
497 with results:
498 if isinstance(interp, interpreters.Interpreter):
499 interp.exec(script)
500 else:
501 err = _interpreters.run_string(interp, wrapped)
502 if err is not None:
503 return None, err
504 return results.stdout(), None
505
506 def run_and_capture(self, interp, script):
507 text, err = self._run_string(interp, script)

Callers 1

run_and_captureMethod · 0.95

Calls 3

execMethod · 0.80
_captured_scriptFunction · 0.70
stdoutMethod · 0.45

Tested by

no test coverage detected