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

Function run_in_subinterp

Lib/test/support/__init__.py:1952–1962  ·  view source on GitHub ↗

Run code in a subinterpreter. Raise unittest.SkipTest if the tracemalloc module is enabled.

(code)

Source from the content-addressed store, hash-verified

1950
1951
1952def run_in_subinterp(code):
1953 """
1954 Run code in a subinterpreter. Raise unittest.SkipTest if the tracemalloc
1955 module is enabled.
1956 """
1957 _check_tracemalloc()
1958 try:
1959 import _testcapi
1960 except ImportError:
1961 raise unittest.SkipTest("requires _testcapi")
1962 return _testcapi.run_in_subinterp(code)
1963
1964
1965def run_in_subinterp_with_config(code, *, own_gil=None, **config):

Callers 1

_from_subinterpMethod · 0.90

Calls 1

_check_tracemallocFunction · 0.85

Tested by

no test coverage detected