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

Method test_still_running_at_exit

Lib/test/test__interpreters.py:828–849  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

826 # XXX Fix this test!
827 @unittest.skip('blocking forever')
828 def test_still_running_at_exit(self):
829 script = dedent("""
830 from textwrap import dedent
831 import threading
832 import _interpreters
833 id = _interpreters.create()
834 def f():
835 _interpreters.run_string(id, dedent('''
836 import time
837 # Give plenty of time for the main interpreter to finish.
838 time.sleep(1_000_000)
839 '''))
840
841 t = threading.Thread(target=f)
842 t.start()
843 """)
844 with support.temp_dir() as dirname:
845 filename = script_helper.make_script(dirname, 'interp', script)
846 with script_helper.spawn_python(filename) as proc:
847 retcode = proc.wait()
848
849 self.assertEqual(retcode, 0)
850
851
852class RunFailedTests(TestBase):

Callers

nothing calls this directly

Calls 5

dedentFunction · 0.90
temp_dirMethod · 0.80
make_scriptMethod · 0.45
waitMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected