From 12beb3d8a8f5d1df15cb918808fca284ab38ac6a Mon Sep 17 00:00:00 2001 From: Seth Troisi Date: Mon, 9 Nov 2026 17:05:50 -0800 Subject: [PATCH] test: Fix output in test_auth.py --- tests/test_auth.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_auth.py b/tests/test_auth.py index f2c6d9f..f4bed8d 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -262,6 +262,9 @@ def test_get_credentials_keyring_timeout_falls_back_to_remote_flow(mock_deps, mo res = get_credentials("dummy_config.json", provider=AuthProvider.OAUTH2) finally: hang_event.set() + for t in list(threading.enumerate()): + if t is not threading.current_thread() and t.daemon: + t.join(timeout=1.0) mock_flow.fetch_token.assert_called_once_with(code="pasted-code") mock_deps["session"].assert_called_once_with(mock_creds_new) @@ -455,6 +458,9 @@ def custom_slow_operation(): _run_with_timeout(custom_slow_operation, timeout=0.01) finally: hang_event.set() + for t in list(threading.enumerate()): + if t is not threading.current_thread() and t.daemon: + t.join(timeout=1.0) def test_remote_redirect_is_not_oob(): @@ -651,6 +657,9 @@ def test_linux_keyring_lock_check_runs_under_timeout(mock_deps, mocker, capsys): res = get_credentials("dummy_config.json", provider=AuthProvider.OAUTH2) finally: hang_event.set() + for t in list(threading.enumerate()): + if t is not threading.current_thread() and t.daemon: + t.join(timeout=1.0) err = capsys.readouterr().err assert "Operation 'get_password' timed out" in err