CodeVetter · Repo Unpack · Testing signals
encode/starlette
Tests and CI were inspected, not executed; no passing result or measured coverage is established here. The inspected suite uses pytest, AnyIO backends, in-process TestClient calls, and direct ASGI message tests. Assertions cover lifecycle, body-limit branches, upload cleanup, file containment, ranges, sessions, and background execution. Coverage excludes selected branches, and this bounded inspection does not establish exhaustive scenario or deployment coverage.
- The pytest harness builds TestClient with AnyIO backend fixtures and optionally activates BlockBuster for Starlette blocking-call detection; lifespan tests assert startup inside the client context and teardown after exit.
- Test Suite CI defines Ubuntu jobs for Python 3.11–3.15, installs dependencies, builds package/docs, runs scripts/test and scripts/coverage, and skips scripts/check specifically on Python 3.14; these definitions were inspected, not run.
- Coverage measures branches in both starlette and tests and scripts/coverage requires 100%; overloads, NotImplementedError, and explicit pragma exclusions limit what that gate measures, so README's coverage statement is not a verified result.
- Upload tests assert spool rollover occurs outside the application thread and temporary files close after stream failure or simulated disk-full OSError; these are executable assertions, not observed successes.
- Body-limit tests exercise rejection before receive, accumulated bytes without reliable Content-Length, failure after response start, enforcement before user middleware, and route limits that raise or lower the application limit.
- Static-file tests call ASGI helpers directly for traversal because the client normalizes paths; response tests assert 100-range acceptance, over-limit fallback to full 200, malformed-range 400, and unsatisfiable-range 416.
- Session tests distinguish modification-driven Set-Cookie from read-only access and verify Vary: Cookie; background tests assert sequential callbacks and that a failing first task prevents the next task from executing.
- CodSpeed CI selects ten benchmark modules in simulation,memory mode on Python 3.14 with fixed allocator/hash settings; routing fixtures compare 20/120-route tables using fresh scopes and status assertions. Neither benchmarks nor CI were executed, and in-process transport evidence does not establish live-server behavior.