Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix duplicate test method name and _thread test.
  • Loading branch information
gpshead committed Mar 19, 2024
commit 1ba58cd17536c2e0da2f81ecb956757236067286
7 changes: 3 additions & 4 deletions Lib/test/test_threading.py
Original file line number Diff line number Diff line change
Expand Up @@ -1161,18 +1161,17 @@ def test_start_new_thread_at_exit(self):
import _thread

def f():
print("should be printed")
pass

def exit_handler():
_thread.start_new_thread(f, ())

atexit.register(exit_handler)
"""
_, out, err = assert_python_ok("-c", code)
self.assertEqual(out.strip(), b'should be printed',
msg=err.decode('utf-8', errors='replace'))
self.assertEqual(err.strip(), b'')

def test_start_new_thread_at_exit(self):
def test_start_threading_thread_at_exit(self):
# gh-113964: atexit needs to be able to start threads.
code = """if 1:
import atexit
Expand Down