pytest-asyncioauto mode. Async test functions do not require@pytest.mark.asyncio. The setting lives inpyproject.tomlunder[tool.pytest.ini_options].httpx2.MockTransportfor transport mocking, notrespx. Tests constructhttpx2.AsyncClient(transport=httpx2.MockTransport(handler))and pass it ashttpx2_client=toAsyncClient(or the sync equivalenthttpx2.Client(transport=httpx2.MockTransport(handler))toClient).MockTransportis the public test seam inhttpx2;respxpatches private internals and breaks acrosshttpxmajor versions.- Hypothesis property-based tests for concurrency-sensitive code:
RetryBudget,Bulkhead, retry interleaving. Files are namedtest_*_props.pyso they are easy to grep and treat separately in CI. - Performance tests are opt-in. The
perfpytest marker is registered inpyproject.toml; the defaultaddoptsline includes-m 'not perf'. Run benchmarks explicitly withpytest -m perf. - Coverage is 100% line coverage. New code is expected to maintain this.