File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed
Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,9 @@ def f(mutex):
170170 mutex .acquire ()
171171 self .assertIn (tid , threading ._active )
172172 self .assertIsInstance (threading ._active [tid ], threading ._DummyThread )
173+ #Issue 29376
174+ self .assertTrue (threading ._active [tid ].is_alive ())
175+ self .assertRegex (repr (threading ._active [tid ]), '_DummyThread' )
173176 del threading ._active [tid ]
174177
175178 # PyThreadState_SetAsyncExc() is a CPython-only gimmick, not (currently)
Original file line number Diff line number Diff line change @@ -1217,6 +1217,10 @@ def __init__(self):
12171217 def _stop (self ):
12181218 pass
12191219
1220+ def is_alive (self ):
1221+ assert not self ._is_stopped and self ._started .is_set ()
1222+ return True
1223+
12201224 def join (self , timeout = None ):
12211225 assert False , "cannot join a dummy thread"
12221226
Original file line number Diff line number Diff line change @@ -249,6 +249,8 @@ Extension Modules
249249Library
250250-------
251251
252+ - bpo-29376: Fix assertion error in threading._DummyThread.is_alive().
253+
252254- bpo-28624: Add a test that checks that cwd parameter of Popen() accepts
253255 PathLike objects. Patch by Sayan Chowdhury.
254256
You can’t perform that action at this time.
0 commit comments