diff --git a/setup.cfg b/setup.cfg index 2a3bc303..de10fa55 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,6 +21,7 @@ filterwarnings = default:::uvicorn markers = copied_from(source, changes=None): mark test as copied from somewhere else, along with a description of changes made to accodomate e.g. our test setup + network: marks tests which require network connection. Used in 3rd-party build environments that have network disabled. [coverage:run] omit = venv/*, httpx/_compat.py diff --git a/tests/client/test_proxies.py b/tests/client/test_proxies.py index 6ea4cbe4..2817d202 100644 --- a/tests/client/test_proxies.py +++ b/tests/client/test_proxies.py @@ -122,6 +122,7 @@ def test_transport_for_request(url, proxies, expected): @pytest.mark.asyncio +@pytest.mark.network async def test_async_proxy_close(): try: client = httpx.AsyncClient(proxies={"https://": PROXY_URL}) @@ -130,6 +131,7 @@ async def test_async_proxy_close(): await client.aclose() +@pytest.mark.network def test_sync_proxy_close(): try: client = httpx.Client(proxies={"https://": PROXY_URL}) diff --git a/tests/test_timeouts.py b/tests/test_timeouts.py index 46a8bee8..c7a665c3 100644 --- a/tests/test_timeouts.py +++ b/tests/test_timeouts.py @@ -23,6 +23,7 @@ async def test_write_timeout(server): @pytest.mark.usefixtures("async_environment") +@pytest.mark.network async def test_connect_timeout(server): timeout = httpx.Timeout(None, connect=1e-6)