MCPcopy Index your code
hub / github.com/RustPython/RustPython / _call

Method _call

Lib/test/support/__init__.py:1670–1682  ·  view source on GitHub ↗
(self, python, args, env, returncode)

Source from the content-addressed store, hash-verified

1668 print("failed to clean up {}: {}".format(link, ex))
1669
1670 def _call(self, python, args, env, returncode):
1671 import subprocess
1672 cmd = [python, *args]
1673 p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
1674 stderr=subprocess.PIPE, env=env)
1675 r = p.communicate()
1676 if p.returncode != returncode:
1677 if verbose:
1678 print(repr(r[0]))
1679 print(repr(r[1]), file=sys.stderr)
1680 raise RuntimeError(
1681 'unexpected return code: {0} (0x{0:08X})'.format(p.returncode))
1682 return r
1683
1684 def call_real(self, *args, returncode=0):
1685 return self._call(self.real, args, None, returncode)

Callers 10

call_realMethod · 0.95
call_linkMethod · 0.95
__call__Method · 0.45
__call__Method · 0.45
__del__Method · 0.45
actualMethod · 0.45
cgetMethod · 0.45
configMethod · 0.45
measureMethod · 0.45
metricsMethod · 0.45

Calls 4

communicateMethod · 0.95
reprFunction · 0.85
printFunction · 0.50
formatMethod · 0.45

Tested by

no test coverage detected