diff --git a/tests/client/test_async_client.py b/tests/client/test_async_client.py index 8d7eaa3c..b02671fc 100644 --- a/tests/client/test_async_client.py +++ b/tests/client/test_async_client.py @@ -3,9 +3,8 @@ from __future__ import annotations import typing from datetime import timedelta -import pytest - import httpx +import pytest @pytest.mark.anyio diff --git a/tests/client/test_auth.py b/tests/client/test_auth.py index 7638b8bd..afb9dc50 100644 --- a/tests/client/test_auth.py +++ b/tests/client/test_auth.py @@ -13,9 +13,8 @@ import typing from urllib.request import parse_keqv_list import anyio -import pytest - import httpx +import pytest from ..common import FIXTURES_DIR diff --git a/tests/client/test_client.py b/tests/client/test_client.py index 65783901..142cb24b 100644 --- a/tests/client/test_client.py +++ b/tests/client/test_client.py @@ -4,9 +4,8 @@ import typing from datetime import timedelta import chardet -import pytest - import httpx +import pytest def autodetect(content): diff --git a/tests/client/test_cookies.py b/tests/client/test_cookies.py index f0c83525..d977dbe8 100644 --- a/tests/client/test_cookies.py +++ b/tests/client/test_cookies.py @@ -1,8 +1,7 @@ from http.cookiejar import Cookie, CookieJar -import pytest - import httpx +import pytest def get_and_set_cookies(request: httpx.Request) -> httpx.Response: diff --git a/tests/client/test_event_hooks.py b/tests/client/test_event_hooks.py index 78fb0484..dc995713 100644 --- a/tests/client/test_event_hooks.py +++ b/tests/client/test_event_hooks.py @@ -1,6 +1,5 @@ -import pytest - import httpx +import pytest def app(request: httpx.Request) -> httpx.Response: diff --git a/tests/client/test_headers.py b/tests/client/test_headers.py index 47f5a4d7..5f975e30 100755 --- a/tests/client/test_headers.py +++ b/tests/client/test_headers.py @@ -1,8 +1,7 @@ #!/usr/bin/env python3 -import pytest - import httpx +import pytest def echo_headers(request: httpx.Request) -> httpx.Response: diff --git a/tests/client/test_proxies.py b/tests/client/test_proxies.py index 3e4090dc..9806d439 100644 --- a/tests/client/test_proxies.py +++ b/tests/client/test_proxies.py @@ -1,7 +1,6 @@ import httpcore -import pytest - import httpx +import pytest def url_to_origin(url: str) -> httpcore.URL: diff --git a/tests/client/test_redirects.py b/tests/client/test_redirects.py index f6582713..8b367216 100644 --- a/tests/client/test_redirects.py +++ b/tests/client/test_redirects.py @@ -1,8 +1,7 @@ import typing -import pytest - import httpx +import pytest def redirects(request: httpx.Request) -> httpx.Response: diff --git a/tests/conftest.py b/tests/conftest.py index 858bca13..94b82aeb 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -5,6 +5,7 @@ import threading import time import typing +import httpx import pytest import trustme from cryptography.hazmat.backends import default_backend @@ -17,7 +18,6 @@ from cryptography.hazmat.primitives.serialization import ( from uvicorn.config import Config from uvicorn.server import Server -import httpx from tests.concurrency import sleep ENVIRONMENT_VARIABLES = { diff --git a/tests/models/test_cookies.py b/tests/models/test_cookies.py index f7abe11a..8cac8b4f 100644 --- a/tests/models/test_cookies.py +++ b/tests/models/test_cookies.py @@ -1,8 +1,7 @@ import http -import pytest - import httpx +import pytest def test_cookies(): diff --git a/tests/models/test_headers.py b/tests/models/test_headers.py index a87a4467..ad1d89af 100644 --- a/tests/models/test_headers.py +++ b/tests/models/test_headers.py @@ -1,6 +1,5 @@ -import pytest - import httpx +import pytest def test_headers(): diff --git a/tests/models/test_queryparams.py b/tests/models/test_queryparams.py index 29b2ca63..54e47050 100644 --- a/tests/models/test_queryparams.py +++ b/tests/models/test_queryparams.py @@ -1,6 +1,5 @@ -import pytest - import httpx +import pytest @pytest.mark.parametrize( diff --git a/tests/models/test_requests.py b/tests/models/test_requests.py index b31fe007..3e5bed9b 100644 --- a/tests/models/test_requests.py +++ b/tests/models/test_requests.py @@ -1,9 +1,8 @@ import pickle import typing -import pytest - import httpx +import pytest def test_request_repr(): diff --git a/tests/models/test_responses.py b/tests/models/test_responses.py index 06c28e1e..f484d5d6 100644 --- a/tests/models/test_responses.py +++ b/tests/models/test_responses.py @@ -3,9 +3,8 @@ import pickle import typing import chardet -import pytest - import httpx +import pytest class StreamingBody: diff --git a/tests/models/test_url.py b/tests/models/test_url.py index 03072e8f..aa0fece3 100644 --- a/tests/models/test_url.py +++ b/tests/models/test_url.py @@ -1,6 +1,5 @@ -import pytest - import httpx +import pytest # Tests for `httpx.URL` instantiation and property accessors. diff --git a/tests/models/test_whatwg.py b/tests/models/test_whatwg.py index 14af6825..5e33e236 100644 --- a/tests/models/test_whatwg.py +++ b/tests/models/test_whatwg.py @@ -5,7 +5,6 @@ import json import pytest - from httpx._urlparse import urlparse # URL test cases from... diff --git a/tests/test_api.py b/tests/test_api.py index 225f384e..8d8147b3 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -1,8 +1,7 @@ import typing -import pytest - import httpx +import pytest def test_get(server): diff --git a/tests/test_asgi.py b/tests/test_asgi.py index ffbc91bc..1a5c308a 100644 --- a/tests/test_asgi.py +++ b/tests/test_asgi.py @@ -1,8 +1,7 @@ import json -import pytest - import httpx +import pytest async def hello_world(scope, receive, send): diff --git a/tests/test_auth.py b/tests/test_auth.py index 6b6df922..8179da73 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -6,9 +6,8 @@ Integration tests also exist in tests/client/test_auth.py from urllib.request import parse_keqv_list -import pytest - import httpx +import pytest def test_basic_auth(): diff --git a/tests/test_config.py b/tests/test_config.py index 22abd4c2..381e10ec 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -3,9 +3,8 @@ import typing from pathlib import Path import certifi -import pytest - import httpx +import pytest def test_load_ssl_config(): diff --git a/tests/test_content.py b/tests/test_content.py index f63ec18a..f670ebfb 100644 --- a/tests/test_content.py +++ b/tests/test_content.py @@ -1,9 +1,8 @@ import io import typing -import pytest - import httpx +import pytest method = "POST" url = "https://www.example.com" diff --git a/tests/test_decoders.py b/tests/test_decoders.py index 9ffaba18..f61142e2 100644 --- a/tests/test_decoders.py +++ b/tests/test_decoders.py @@ -5,11 +5,10 @@ import typing import zlib import chardet +import httpx import pytest import zstandard as zstd -import httpx - def test_deflate(): """ diff --git a/tests/test_exceptions.py b/tests/test_exceptions.py index 60c8721c..a4366dec 100644 --- a/tests/test_exceptions.py +++ b/tests/test_exceptions.py @@ -3,9 +3,8 @@ from __future__ import annotations import typing import httpcore -import pytest - import httpx +import pytest if typing.TYPE_CHECKING: # pragma: no cover from conftest import TestServer diff --git a/tests/test_main.py b/tests/test_main.py index b1a77d48..81657d06 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -1,9 +1,8 @@ import os import typing -from click.testing import CliRunner - import httpx +from click.testing import CliRunner def splitlines(output: str) -> typing.Iterable[str]: diff --git a/tests/test_multipart.py b/tests/test_multipart.py index 764f85a2..97449edb 100644 --- a/tests/test_multipart.py +++ b/tests/test_multipart.py @@ -4,9 +4,8 @@ import io import tempfile import typing -import pytest - import httpx +import pytest def echo_request_content(request: httpx.Request) -> httpx.Response: diff --git a/tests/test_timeouts.py b/tests/test_timeouts.py index 666cc8e3..3feb933f 100644 --- a/tests/test_timeouts.py +++ b/tests/test_timeouts.py @@ -1,6 +1,5 @@ -import pytest - import httpx +import pytest @pytest.mark.anyio diff --git a/tests/test_utils.py b/tests/test_utils.py index f9c215f6..8d68304b 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -3,9 +3,8 @@ import logging import os import random -import pytest - import httpx +import pytest from httpx._utils import URLPattern, get_environment_proxies diff --git a/tests/test_wsgi.py b/tests/test_wsgi.py index dc2b5288..20dd4e22 100644 --- a/tests/test_wsgi.py +++ b/tests/test_wsgi.py @@ -6,9 +6,8 @@ import wsgiref.validate from functools import partial from io import StringIO -import pytest - import httpx +import pytest if typing.TYPE_CHECKING: # pragma: no cover from _typeshed.wsgi import StartResponse, WSGIApplication, WSGIEnvironment