Skip to content

Commit 1761c37

Browse files
committed
Fix threading tests.
1 parent 149e0cf commit 1761c37

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Lib/test/test_threading.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,6 +1595,8 @@ def task():
15951595

15961596
@cpython_only
15971597
def test_daemon_threads_fatal_error(self):
1598+
# This used to crash, but Py_EndInterpreter() can now
1599+
# handle remaining threads.
15981600
import_module("_testcapi")
15991601
subinterp_code = f"""if 1:
16001602
import os
@@ -1612,10 +1614,7 @@ def f():
16121614
16131615
_testcapi.run_in_subinterp(%r)
16141616
""" % (subinterp_code,)
1615-
with test.support.SuppressCrashReport():
1616-
rc, out, err = assert_python_failure("-c", script)
1617-
self.assertIn("Fatal Python error: Py_EndInterpreter: "
1618-
"not the last thread", err.decode())
1617+
assert_python_ok("-c", script)
16191618

16201619
def _check_allowed(self, before_start='', *,
16211620
allowed=True,

0 commit comments

Comments
 (0)