From 184aa5b2b386346ae92efa1cd64bffeba9e66234 Mon Sep 17 00:00:00 2001 From: teknium1 Date: Wed, 11 Mar 2026 06:31:56 -0700 Subject: [PATCH] fix: tighten exc_info assertion in vision test (from PR #803) The weaker assertion (r.exc_info is not None) passes even when exc_info is (None, None, None). Check r.exc_info[0] is not None to verify actual exception info is present. The _aux_async_client mock was already applied on main. Co-authored-by: OutThisLife --- tests/tools/test_vision_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tools/test_vision_tools.py b/tests/tools/test_vision_tools.py index 58fe7d61..0135284a 100644 --- a/tests/tools/test_vision_tools.py +++ b/tests/tools/test_vision_tools.py @@ -289,7 +289,7 @@ class TestErrorLoggingExcInfo: assert result_data["success"] is False error_records = [r for r in caplog.records if r.levelno >= logging.ERROR] - assert any(r.exc_info is not None for r in error_records) + assert any(r.exc_info and r.exc_info[0] is not None for r in error_records) @pytest.mark.asyncio async def test_cleanup_error_logs_exc_info(self, tmp_path, caplog):