# Testing signals — encode/httpx

> Canonical page: https://codevetter.com/unpack/httpx/testing-signals

# Testing signals — encode/httpx

Scanned commit b5addb64f0161ff6bfe94c124ef76f6a1fba5254 (2026-02-23). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

Tests and CI were inspected, not executed; test existence and configured thresholds are not passing results. The suite uses pytest, AnyIO-marked async tests, mock transports, and local Uvicorn servers. Inspected cases exercise important policy, streaming, CLI, and timeout behavior. Coverage exclusions and filtered conformance fixtures limit what the advertised coverage goal establishes, and this investigation is bounded rather than exhaustive.
- pytest is pinned in tooling requirements; pyproject configures warnings as errors and a network marker, while async tests use pytest.mark.anyio and test helpers accommodate asyncio and Trio. — [requirements.txt#L20-L29](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/requirements.txt#L20-L29) [pyproject.toml#L117-L128](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/pyproject.toml#L117-L128) [tests/test_timeouts.py#L6-L27](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/tests/test_timeouts.py#L6-L27) [tests/concurrency.py#L11-L15](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/tests/concurrency.py#L11-L15)
- The inspected Test Suite workflow runs on Ubuntu with Python 3.9–3.13 and calls install, check, build, test, and coverage scripts. No execution result was obtained for this commit. — [.github/workflows/test-suite.yml#L10-L34](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/.github/workflows/test-suite.yml#L10-L34)
- scripts/test runs pytest under coverage and adds check/coverage steps outside GitHub Actions; coverage includes httpx and tests and enforces fail-under=100. Certificate environment branches and several CLI TLS/HTTP2 trace branches carry coverage exclusions. — [scripts/test#L10-L18](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/scripts/test#L10-L18) [scripts/coverage#L11-L11](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/scripts/coverage#L11-L11) [pyproject.toml#L130-L132](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/pyproject.toml#L130-L132) [httpx/_main.py#L223-L248](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/httpx/_main.py#L223-L248)
- MockTransport redirect tests assert cross-domain Authorization removal, same-domain retention and HTTP-to-HTTPS retention, 308 body preservation, 303 body removal, generator replay failure, and login/logout cookie persistence. — [tests/client/test_redirects.py#L266-L334](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/tests/client/test_redirects.py#L266-L334) [tests/client/test_redirects.py#L345-L361](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/tests/client/test_redirects.py#L345-L361) [tests/client/test_redirects.py#L403-L431](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/tests/client/test_redirects.py#L403-L431)
- Hook tests check sync/async request and response events, closure after response-hook exceptions, and repeated hook invocation on redirects; auth tests explicitly expect unsupported Digest auth-int and consumed async-body replay failures. — [tests/client/test_event_hooks.py#L51-L115](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/tests/client/test_event_hooks.py#L51-L115) [tests/client/test_event_hooks.py#L118-L138](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/tests/client/test_event_hooks.py#L118-L138) [tests/client/test_auth.py#L505-L512](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/tests/client/test_auth.py#L505-L512) [tests/client/test_auth.py#L688-L707](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/tests/client/test_auth.py#L688-L707)
- CLI tests use CliRunner with a local server to assert text/JSON/binary output, redirects, POST JSON, verbose authorization output, downloads in an isolated filesystem, and unsupported-protocol exit behavior. — [tests/test_main.py#L17-L118](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/tests/test_main.py#L17-L118) [tests/test_main.py#L121-L187](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/tests/test_main.py#L121-L187) [tests/conftest.py#L283-L287](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/tests/conftest.py#L283-L287)
- Timeout tests exercise read, write, connection and pool failures; the connection case is network-marked and targets 10.255.255.1, while the pool case holds a stream with max_connections=1 before issuing a second request. — [tests/test_timeouts.py#L6-L44](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/tests/test_timeouts.py#L6-L44) [tests/conftest.py#L101-L110](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/tests/conftest.py#L101-L110)
- Decoder tests assert decompression, stacked encodings, invalid-data errors, streaming text and split-line behavior; WHATWG URL tests omit fixture failure cases and return early for two space-encoding cases, so that adapter is not full WHATWG conformance coverage. — [tests/test_decoders.py#L14-L88](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/tests/test_decoders.py#L14-L88) [tests/test_decoders.py#L144-L201](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/tests/test_decoders.py#L144-L201) [tests/test_decoders.py#L222-L231](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/tests/test_decoders.py#L222-L231) [tests/models/test_whatwg.py#L13-L28](https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/tests/models/test_whatwg.py#L13-L28)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
