Skip to content

Commit

Permalink
Add pragma no cover to deal with oddly misbehaving test
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchristie committed Sep 27, 2024
1 parent bbd50c2 commit dbce346
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions httpcore/_backends/anyio.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ async def connect_tcp(
timeout: typing.Optional[float] = None,
local_address: typing.Optional[str] = None,
socket_options: typing.Optional[typing.Iterable[SOCKET_OPTION]] = None,
) -> AsyncNetworkStream:
) -> AsyncNetworkStream: # pragma: nocover
if socket_options is None:
socket_options = [] # pragma: no cover
socket_options = []
exc_map = {
TimeoutError: ConnectTimeout,
OSError: ConnectError,
Expand All @@ -120,7 +120,7 @@ async def connect_tcp(
local_host=local_address,
)
# By default TCP sockets opened in `asyncio` include TCP_NODELAY.
for option in socket_options: # pragma: nocover
for option in socket_options:
stream._raw_socket.setsockopt(*option) # type: ignore[attr-defined] # pragma: no cover
return AnyIOStream(stream)

Expand Down

0 comments on commit dbce346

Please sign in to comment.