From: Tom Christie Date: Fri, 24 Jul 2020 14:24:06 +0000 (+0100) Subject: Full coverage, with exception of URLLib3Transport (#1086) X-Git-Tag: 0.14.0~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d491c9e7d00c8564049b7708ae6861ec7355380;p=thirdparty%2Fhttpx.git Full coverage, with exception of URLLib3Transport (#1086) --- diff --git a/scripts/coverage b/scripts/coverage index ab476b35..a476e8b2 100755 --- a/scripts/coverage +++ b/scripts/coverage @@ -8,4 +8,4 @@ export SOURCE_FILES="httpx tests" set -x -${PREFIX}coverage report --show-missing --skip-covered --fail-under=99 +${PREFIX}coverage report --omit=httpx/_transports/urllib3.py --show-missing --skip-covered --fail-under=100 diff --git a/tests/client/test_async_client.py b/tests/client/test_async_client.py index f51c1df2..b50565a7 100644 --- a/tests/client/test_async_client.py +++ b/tests/client/test_async_client.py @@ -17,6 +17,9 @@ async def test_get(server): assert repr(response) == "" assert response.elapsed > timedelta(seconds=0) + with pytest.raises(httpx.NotRedirectResponse): + await response.anext() + @pytest.mark.parametrize( "url", diff --git a/tests/client/test_client.py b/tests/client/test_client.py index 4aae02c1..073cebf9 100644 --- a/tests/client/test_client.py +++ b/tests/client/test_client.py @@ -21,6 +21,9 @@ def test_get(server): assert repr(response) == "" assert response.elapsed > timedelta(0) + with pytest.raises(httpx.NotRedirectResponse): + response.next() + @pytest.mark.parametrize( "url",