From 10874af19ac4fbf29db260d317493ef5d26755e7 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:09:37 +0200 Subject: [PATCH] Ignore lingering pycares shutdown thread (#146733) --- tests/conftest.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index c326f57ca2f..8b5c5e26c36 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -382,8 +382,10 @@ def verify_cleanup( # Verify no threads where left behind. threads = frozenset(threading.enumerate()) - threads_before for thread in threads: - assert isinstance(thread, threading._DummyThread) or thread.name.startswith( - "waitpid-" + assert ( + isinstance(thread, threading._DummyThread) + or thread.name.startswith("waitpid-") + or "_run_safe_shutdown_loop" in thread.name ) try: