Skip to content

Commit 5dea8c8

Browse files
test(core): drop vacuous URLError wait-strategy case
The assertion returned False both with and without the HTTPError close fix, so it did not lock in the leak change. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent f746f20 commit 5dea8c8

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

‎tests/core/test_wait_strategies.py‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from datetime import timedelta
77
from email.message import Message
88
from unittest.mock import Mock, patch
9-
from urllib.error import HTTPError, URLError
9+
from urllib.error import HTTPError
1010

1111
import pytest
1212

@@ -389,14 +389,6 @@ def test_try_http_request_closes_http_error(self, mock_urlopen, status_codes, ex
389389
assert result is expected_result
390390
assert fp.closed
391391

392-
@patch("testcontainers.core.wait_strategies.urlopen")
393-
def test_try_http_request_url_error(self, mock_urlopen):
394-
"""A URLError without a wrapped response is not an acceptable status code."""
395-
mock_urlopen.side_effect = URLError("connection refused")
396-
strategy = HttpWaitStrategy(8080)
397-
398-
assert strategy._try_http_request("http://localhost:8080/", {}, None) is False
399-
400392

401393
class TestHealthcheckWaitStrategy:
402394
"""Test the HealthcheckWaitStrategy class."""

0 commit comments

Comments
 (0)