MCPcopy
hub / github.com/urllib3/urllib3 / test_dnsresolver_expected_error

Method test_dnsresolver_expected_error

test/test_util.py:895–900  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

893 create_connection(("example.com", 80))
894
895 def test_dnsresolver_expected_error(self) -> None:
896 with pytest.raises(socket.gaierror):
897 # windows: [Errno 11001] getaddrinfo failed in windows
898 # linux: [Errno -2] Name or service not known
899 # macos: [Errno 8] nodename nor servname provided, or not known
900 create_connection(("badhost.invalid", 80))
901
902 @patch("socket.getaddrinfo")
903 @patch("socket.socket")

Callers

nothing calls this directly

Calls 1

create_connectionFunction · 0.90

Tested by

no test coverage detected