fix(gate): clear the xenon complexity failure + fixable test warnings

- transcript_retention.py: split select_prunable_transcripts into small helpers
  so the module averages complexity rank A (was B — failed make quality / xenon).
- pyproject: move the markers table from [tool.coverage.run] (coverage warned
  'Unrecognized option') to [tool.pytest.ini_options] where it belongs.
- HTTP_422_UNPROCESSABLE_ENTITY -> HTTP_422_UNPROCESSABLE_CONTENT (old name
  deprecated) in the tasks/product/settings routes + the validation middleware.
- conftest: drop pool_pre_ping on the per-test engine — pointless for a fresh
  per-test engine and it leaves an un-awaited asyncpg Connection._cancel
  coroutine that surfaced as a RuntimeWarning across ~30 integration tests.
This commit is contained in:
Renn F
2026-06-12 23:51:45 +02:00
parent 320499811b
commit b034c64177
7 changed files with 30 additions and 20 deletions
+6 -6
View File
@@ -237,6 +237,12 @@ testpaths = ["tests"]
python_files = ["test_*.py"]
asyncio_default_fixture_loop_scope = "function"
addopts = "--cov=roboco --cov-report=term-missing"
markers = [
"asyncio: mark tests as async",
"slow: marks tests as slow",
"integration: marks tests as integration tests",
"unit: marks tests as unit tests",
]
[tool.coverage.run]
# Coverage core. Python 3.12+ supports sys.monitoring; the legacy `pytrace`
@@ -286,12 +292,6 @@ omit = [
# Auto-generated migrations.
"alembic/*",
]
markers = [
"asyncio: mark tests as async",
"slow: marks tests as slow",
"integration: marks tests as integration tests",
"unit: marks tests as unit tests",
]
# =============================================================================
# Vulture Configuration