Kaydet (Commit) da3e5cf9 authored tarafından Victor Stinner's avatar Victor Stinner Kaydeden (comit) GitHub

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.
üst 5d84cb36
......@@ -1099,6 +1099,8 @@ class TimerTests(BaseTestCase):
self.callback_event.wait()
self.assertEqual(len(self.callback_args), 2)
self.assertEqual(self.callback_args, [((), {}), ((), {})])
timer1.join()
timer2.join()
def _callback_spy(self, *args, **kwargs):
self.callback_args.append((args[:], kwargs.copy()))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment