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

Method test_in_subinterpreter

Lib/test/test_interpreters/test_api.py:134–143  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

132 self.assertIn(interp, interpreters.list_all())
133
134 def test_in_subinterpreter(self):
135 main, = interpreters.list_all()
136 interp = interpreters.create()
137 out = _run_output(interp, dedent("""
138 from concurrent import interpreters
139 interp = interpreters.create()
140 print(interp.id)
141 """))
142 interp2 = interpreters.Interpreter(int(out))
143 self.assertEqual(interpreters.list_all(), [main, interp, interp2])
144
145 def test_after_destroy_all(self):
146 before = set(interpreters.list_all())

Callers

nothing calls this directly

Calls 4

dedentFunction · 0.90
_run_outputFunction · 0.70
createMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected