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 <nickolasgustafsson@gmail.com>
This commit is contained in:
teknium1
2026-03-11 06:31:56 -07:00
parent bdcf247efe
commit 184aa5b2b3

View File

@@ -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):