mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
test: lift coverage 41% → 76% (+1068 tests across 36 files)
Service-level tests now exercise provider, permissions, project, journal, messaging, work_session, metrics, kanban, extraction, learning, notification, dashboard, llm_routing, a2a, task, repository_base, audit, db_seed, branch_name, indexed_document, query_helpers, agent. API route tests cover provider, journal, project, sessions, dashboard, work_session, tasks, a2a, groups, notifications, agents, channels, messages, kanban, api_resources. Pure-function helpers covered: handlers, deps_helpers, middleware, middleware_docs, transcription, pr templates, agents_config, errors, logging, journal/notification/channel/a2a access, task_lifecycle, streaming, converters, crypto, schemas (common + websocket), events, permissions extras. pyproject ruff per-file-ignores extended for tests so PLR2004 (status code magic values), PLC0415 (lazy imports), PLR0913 (fixture params), ARG001 (unused fixture deps), SIM105, and E501 don't fight test idioms.
This commit is contained in:
+11
-2
@@ -162,8 +162,17 @@ select = [
|
||||
"roboco/services/*.py" = ["PLC0415"]
|
||||
"roboco/api/routes/*.py" = ["PLC0415"]
|
||||
"roboco/runtime/*.py" = ["PLC0415"]
|
||||
# Test fixtures that reload modules to test env-var-at-import-time behavior
|
||||
"tests/unit/mcp_servers/*.py" = ["PLC0415"]
|
||||
# Tests freely use magic values (status codes, indices), lazy imports for
|
||||
# dependency-isolation, and many fixture parameters — these style rules
|
||||
# are noise in test files.
|
||||
"tests/**/*.py" = [
|
||||
"PLR2004", # magic values (status codes, indices) are normal in tests
|
||||
"PLC0415", # lazy imports for dependency-isolation in tests
|
||||
"PLR0913", # many fixture parameters are normal in tests
|
||||
"ARG001", # unused fixture parameters (db_session for autouse, caplog) are normal
|
||||
"SIM105", # contextlib.suppress vs try/except/pass — both fine in tests
|
||||
"E501", # long lines in test fixtures/payloads are common
|
||||
]
|
||||
|
||||
# =============================================================================
|
||||
# MyPy Configuration
|
||||
|
||||
Reference in New Issue
Block a user