@@ -57,7 +57,7 @@ def handler(request: httpx2.Request) -> httpx2.Response:
5757 client = _client (handler )
5858 with pytest .raises (NotFoundError ) as info :
5959 async with client .stream ("GET" , "https://example.test/missing" ):
60- pytest .fail ("should have raised before reaching block body" ) # pragma: no cover
60+ pytest .fail ("should have raised before reaching block body" )
6161 assert info .value .response .status_code == _NOT_FOUND
6262 assert info .value .response .content == body # body was pre-read; accessible
6363
@@ -71,7 +71,7 @@ def handler(request: httpx2.Request) -> httpx2.Response:
7171 client = _client (handler )
7272 with pytest .raises (ServiceUnavailableError ) as info :
7373 async with client .stream ("GET" , "https://example.test/x" ):
74- pytest .fail ("unreachable" ) # pragma: no cover
74+ pytest .fail ("unreachable" )
7575 assert info .value .response .content == body
7676
7777
@@ -82,7 +82,7 @@ def handler(request: httpx2.Request) -> httpx2.Response:
8282 client = _client (handler )
8383 with pytest .raises (ClientStatusError ) as info :
8484 async with client .stream ("GET" , "https://example.test/x" ):
85- pytest .fail ("unreachable" ) # pragma: no cover
85+ pytest .fail ("unreachable" )
8686 assert type (info .value ) is ClientStatusError
8787 assert info .value .response .status_code == _UNKNOWN_4XX
8888
@@ -94,7 +94,7 @@ def handler(request: httpx2.Request) -> httpx2.Response:
9494 client = _client (handler )
9595 with pytest .raises (ServerStatusError ) as info :
9696 async with client .stream ("GET" , "https://example.test/x" ):
97- pytest .fail ("unreachable" ) # pragma: no cover
97+ pytest .fail ("unreachable" )
9898 assert type (info .value ) is ServerStatusError
9999 assert info .value .response .status_code == _UNKNOWN_5XX
100100
@@ -116,7 +116,7 @@ def handler(request: httpx2.Request) -> httpx2.Response: # noqa: ARG001
116116 client = _client (handler )
117117 with pytest .raises (NetworkError , match = "connect refused" ):
118118 async with client .stream ("GET" , "https://example.test/x" ):
119- pytest .fail ("unreachable" ) # pragma: no cover
119+ pytest .fail ("unreachable" )
120120
121121
122122async def test_network_error_during_body_consumption_maps_to_network_error () -> None :
@@ -147,7 +147,7 @@ def handler(request: httpx2.Request) -> httpx2.Response: # noqa: ARG001
147147 client = _client (handler )
148148 with pytest .raises (HttpwareTimeoutError , match = "read timeout" ):
149149 async with client .stream ("GET" , "https://example.test/x" ):
150- pytest .fail ("unreachable" ) # pragma: no cover
150+ pytest .fail ("unreachable" )
151151
152152
153153async def test_invalid_url_maps_to_bare_transport_error () -> None :
@@ -158,7 +158,7 @@ def handler(request: httpx2.Request) -> httpx2.Response: # noqa: ARG001
158158 client = _client (handler )
159159 with pytest .raises (TransportError ) as info :
160160 async with client .stream ("GET" , "https://example.test/x" ):
161- pytest .fail ("unreachable" ) # pragma: no cover
161+ pytest .fail ("unreachable" )
162162 assert not isinstance (info .value , NetworkError )
163163
164164
0 commit comments