Context
A coverage-backed audit of the suite (511 unit + 64 integration tests) found the following untested areas, ranked by importance.
Tier 1 — untested code guarding correctness/security
Tier 2 — parity and API-contract holes
Line numbers reference the improve/code-quality branch at the time of the audit.
Context
A coverage-backed audit of the suite (511 unit + 64 integration tests) found the following untested areas, ranked by importance.
Tier 1 — untested code guarding correctness/security
IcapResponse.encapsulated(response.py:236-261): the cached property is never accessed by any test — not the parse path, the None branch, caching, orIcapProtocolErrorpropagation on a malformed header. OnlyEncapsulatedParts.parseis fuzzed directly.max_response_sizeenforcement (async_icap.py:805/885/949): Content-Length-exceeds, chunk-exceeds, and cumulative-body-exceeds are tested sync-only (test_client_methods.py:1309-1360); mirror them forAsyncIcapClient.icap.py:860+ async twin): the trailer cap's no-CRLF-flood branch is untested (existing tests only exercise the per-line cap path). Also uncovered: connection-close mid-chunk-size-line (icap.py:841), mid-trailer (icap.py:866), and mid-headers (icap.py:682)._send_with_previewnot-connected / timeout / CancelledError / OSError / early-virus-200, and_scan_stream_chunkedCancelledError + 5xx branches — all tested sync, none async.Tier 2 — parity and API-contract holes
__exit__during an exception (async version is tested; sync only has a structural hasattr check).reqmodunit tests for body / custom headers / auto-connect (sync has all; async has only basic).portsetter rangeValueErroruntested on both clients;MockIcapClient.portsetter lacks range validation entirely (mock/real parity break).icap.pytest_plugin.mock— the re-export module is the compatibility promise of the plugin split, and no test imports it (0% coverage).istagunquoted-value branch (response.py:302),CaseInsensitiveDict.__contains__non-str key (response.py:124),EncapsulatedPartsreq_body/null_body/opt_bodyconcrete assertions, 204-direct-reply-to-partial-preview flow.Line numbers reference the
improve/code-qualitybranch at the time of the audit.