From 3488f77cd63ef8be59e9a0ec737f618361e15c89 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Sat, 20 Sep 2025 13:04:23 +0200 Subject: [PATCH] Remove unused variables --- tests/unit/test_retry.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/unit/test_retry.py b/tests/unit/test_retry.py index cfb873d..9fac107 100644 --- a/tests/unit/test_retry.py +++ b/tests/unit/test_retry.py @@ -68,7 +68,7 @@ async def test_request_retry_on_usage_limit(): async with ( aiohttp.ClientSession() - ) as session: # Dummy session. Will be replaced by mock_session at call + ): # Dummy session. Will be replaced by mock_session at call response = await request("GET", url, mock_session) assert response.status == 200 @@ -96,7 +96,7 @@ async def test_request_retry_exceeds_max_attempts(): async with ( aiohttp.ClientSession() - ) as session: # Dummy session. Will be replaced by mock_session at call + ): # Dummy session. Will be replaced by mock_session at call with pytest.raises(UsageLimitReached): await request("GET", url, mock_session) assert mock_session.request.call_count == max_retries @@ -112,7 +112,7 @@ async def test_request_no_retry_on_generic_403_json(): await _create_mock_response(403, {"message": "API rate limit exceeded"}) ] - async with aiohttp.ClientSession() as session: + async with aiohttp.ClientSession(): with pytest.raises(aiohttp.ClientResponseError): await request("GET", url, mock_session) # Should not retry because it's not the Google quotaExceeded shape @@ -129,7 +129,7 @@ async def test_request_no_retry_on_generic_403_text(): await _create_mock_response(403, "Rate limit exceeded") ] - async with aiohttp.ClientSession() as session: + async with aiohttp.ClientSession(): with pytest.raises(aiohttp.ClientResponseError): await request("GET", url, mock_session) # Should not retry because the JSON shape is not Google quotaExceeded