Commit Graph

1 Commits

Author SHA1 Message Date
Louis King ce4f0da205 test(api): cover --workers CLI branch and factory metrics path
Raise diff coverage above target by exercising the previously untested
lines:

- test_cli.py: invoke the `api` command with uvicorn.run mocked to assert
  the default path passes the app object (no workers/factory) and that
  --workers / API_WORKERS launches the env factory by import string with
  the requested worker count and factory=True.
- test_app_factory.py: add METRICS_ENABLED true/false cases that toggle
  the /metrics route, covering the env-bool parsing branch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 12:17:40 +01:00