]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Full coverage, with exception of URLLib3Transport (#1086)
authorTom Christie <tom@tomchristie.com>
Fri, 24 Jul 2020 14:24:06 +0000 (15:24 +0100)
committerGitHub <noreply@github.com>
Fri, 24 Jul 2020 14:24:06 +0000 (15:24 +0100)
scripts/coverage
tests/client/test_async_client.py
tests/client/test_client.py

index ab476b35c243c7329762f4dadd929913160596ad..a476e8b278123fffe15ee70b6f190aee0d5f4a43 100755 (executable)
@@ -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
index f51c1df2816d9ea2e396882d1f63c4cb76fea305..b50565a72345dd772fc71580ce2060098ccdeef0 100644 (file)
@@ -17,6 +17,9 @@ async def test_get(server):
     assert repr(response) == "<Response [200 OK]>"
     assert response.elapsed > timedelta(seconds=0)
 
+    with pytest.raises(httpx.NotRedirectResponse):
+        await response.anext()
+
 
 @pytest.mark.parametrize(
     "url",
index 4aae02c1b7fad91c69e9c187cafd7ea200186903..073cebf98d2321f41a31a58dd793663bd4c42027 100644 (file)
@@ -21,6 +21,9 @@ def test_get(server):
     assert repr(response) == "<Response [200 OK]>"
     assert response.elapsed > timedelta(0)
 
+    with pytest.raises(httpx.NotRedirectResponse):
+        response.next()
+
 
 @pytest.mark.parametrize(
     "url",