mirror of
https://github.com/python/cpython.git
synced 2025-10-05 06:31:48 +00:00
gh-89898: Fix test_threading.test_args_argument() (GH-92885)
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: <Thread(Thread-134 (<lambda>), started 35314998016)>
ok
(cherry picked from commit 970efae274
)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
1df455042d
commit
58088a544c
1 changed files with 1 additions and 0 deletions
|
@ -149,6 +149,7 @@ class ThreadTests(BaseTestCase):
|
||||||
with self.subTest(target=target, args=args):
|
with self.subTest(target=target, args=args):
|
||||||
t = threading.Thread(target=target, args=args)
|
t = threading.Thread(target=target, args=args)
|
||||||
t.start()
|
t.start()
|
||||||
|
t.join()
|
||||||
|
|
||||||
@cpython_only
|
@cpython_only
|
||||||
def test_disallow_instantiation(self):
|
def test_disallow_instantiation(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue