Skip to content

bpo-31234: Join threads in test_threading #3579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 14, 2017
Merged
Changes from all commits
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
4 changes: 4 additions & 0 deletions Lib/test/test_threading.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@ def f():
self.assertFalse(t.is_alive())
# And verify the thread disposed of _tstate_lock.
self.assertIsNone(t._tstate_lock)
t.join()

def test_repr_stopped(self):
# Verify that "stopped" shows up in repr(Thread) appropriately.
Expand All @@ -604,6 +605,7 @@ def f():
break
time.sleep(0.01)
self.assertIn(LOOKING_FOR, repr(t)) # we waited at least 5 seconds
t.join()

def test_BoundedSemaphore_limit(self):
# BoundedSemaphore should raise ValueError if released too often.
Expand Down Expand Up @@ -918,6 +920,7 @@ def test_start_thread_again(self):
thread = threading.Thread()
thread.start()
self.assertRaises(RuntimeError, thread.start)
thread.join()

def test_joining_current_thread(self):
current_thread = threading.current_thread()
Expand All @@ -931,6 +934,7 @@ def test_daemonize_active_thread(self):
thread = threading.Thread()
thread.start()
self.assertRaises(RuntimeError, setattr, thread, "daemon", True)
thread.join()

def test_releasing_unacquired_lock(self):
lock = threading.Lock()
Expand Down