Skip to content

Commit da3e5cf

Browse files
authored
bpo-31234: Join timers in test_threading (#3598)
Call the .join() method of threading.Timer timers to prevent the "threading_cleanup() failed to cleanup 1 threads" warning.
1 parent 5d84cb3 commit da3e5cf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/test/test_threading.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,6 +1099,8 @@ def test_init_immutable_default_args(self):
10991099
self.callback_event.wait()
11001100
self.assertEqual(len(self.callback_args), 2)
11011101
self.assertEqual(self.callback_args, [((), {}), ((), {})])
1102+
timer1.join()
1103+
timer2.join()
11021104

11031105
def _callback_spy(self, *args, **kwargs):
11041106
self.callback_args.append((args[:], kwargs.copy()))

0 commit comments

Comments
 (0)