diff options
author | Xiang Zhang <angwerzx@126.com> | 2017-02-27 03:01:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-27 03:01:30 (GMT) |
commit | f3a9faba4bad91286b78b498547de928078f55da (patch) | |
tree | a28e1037aa0c99fbf0ece82739f9036b209120a4 /Lib/test/test_threading.py | |
parent | 1f5639c77f736c18fb5a85b4a1850121e25c788e (diff) | |
download | cpython-f3a9faba4bad91286b78b498547de928078f55da.zip cpython-f3a9faba4bad91286b78b498547de928078f55da.tar.gz cpython-f3a9faba4bad91286b78b498547de928078f55da.tar.bz2 |
bpo-29376: Fix assertion error in threading._DummyThread.is_alive() (GH-236)
Diffstat (limited to 'Lib/test/test_threading.py')
-rw-r--r-- | Lib/test/test_threading.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index 2c2914f..6b6c4d2 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -170,6 +170,9 @@ class ThreadTests(BaseTestCase): mutex.acquire() self.assertIn(tid, threading._active) self.assertIsInstance(threading._active[tid], threading._DummyThread) + #Issue 29376 + self.assertTrue(threading._active[tid].is_alive()) + self.assertRegex(repr(threading._active[tid]), '_DummyThread') del threading._active[tid] # PyThreadState_SetAsyncExc() is a CPython-only gimmick, not (currently) |