From 89b98ab7cebe8635eeb9df06bc13a38f059accf8 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 17 May 2022 19:33:19 +0200 Subject: [PATCH] gh-89898: Fix test_threading.test_args_argument() Join the thread to not leak threads running in the background to the next test. Fix the following warning on the "AMD64 FreeBSD Shared 3.11" buildbot: test_args_argument (test.test_threading.ThreadTests.test_args_argument) ... Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2) Warning -- Dangling thread: <_MainThread(MainThread, started 35026161664)> Warning -- Dangling thread: ), started 35314998016)> ok --- Lib/test/test_threading.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index a1bf354e65e2e1..6cdc45f523dcbc 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -149,6 +149,7 @@ def test_args_argument(self): with self.subTest(target=target, args=args): t = threading.Thread(target=target, args=args) t.start() + t.join() @cpython_only def test_disallow_instantiation(self):