Skip to content
Myr

Fix Timeout -> TimeoutException in test case (#598)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tom Christie · committed by GitHub · parent f8794cb · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • tests:+2 added−2 removed

1 file+2 added−2 removed

modified:tests/dispatch/test_http2.py+2 added-2 removed
4 unmodified lines
5import h2.events6import pytest7from h2.settings import SettingCodes89from httpx import Client, Response, Timeout9from httpx import Client, Response, TimeoutException1011from .utils import MockHTTP2Backend1213
127 unmodified lines
141async def test_http2_live_request(backend):142 async with Client(backend=backend, http2=True) as client:143 try:144 resp = await client.get("https://nghttp2.org/httpbin/anything")145 except Timeout:145 except TimeoutException:146 pytest.xfail(reason="nghttp2.org appears to be unresponsive")147 except socket.gaierror:148 pytest.xfail(reason="You appear to be offline")149 assert resp.status_code == 200
1 unmodified line