diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-09-15 12:37:42 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-15 12:37:42 (GMT) |
commit | da3e5cf961f9bcc4bb376386cfe7a2865325086c (patch) | |
tree | a64d532d9ec9227965442a5028fd3f44206b7e42 /Lib | |
parent | 5d84cb368c0c3e475c25171c302068c4dfc3e396 (diff) | |
download | cpython-da3e5cf961f9bcc4bb376386cfe7a2865325086c.zip cpython-da3e5cf961f9bcc4bb376386cfe7a2865325086c.tar.gz cpython-da3e5cf961f9bcc4bb376386cfe7a2865325086c.tar.bz2 |
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.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_threading.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index af6796c..f7c3680 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -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())) |