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

Method new_interp

Lib/test/test_capi/test_misc.py:2245–2253  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

2243 def test_get_config(self):
2244 @contextlib.contextmanager
2245 def new_interp(config):
2246 interpid = _interpreters.create(config, reqrefs=False)
2247 try:
2248 yield interpid
2249 finally:
2250 try:
2251 _interpreters.destroy(interpid)
2252 except _interpreters.InterpreterNotFoundError:
2253 pass
2254
2255 with self.subTest('main'):
2256 expected = _interpreters.new_config('legacy')

Callers

nothing calls this directly

Calls 2

createMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected