test: harden suite with error-path contracts + coverage floor (98%)

Adds tests/test_error_paths.py covering real failure contracts (red-link
single() KeyError, unknown/unattached-shard apply_overlay, kernel.delete
missing, conformance survives a broken profile, Placement str). Adds a
[tool.coverage.report] fail_under=90 floor (engages on pytest --cov, not bare
pytest). 76 tests, 98% coverage, pyflakes clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-16 00:05:16 +02:00
parent 74142096d0
commit 9b7f86ba69
2 changed files with 81 additions and 0 deletions

View File

@@ -36,6 +36,11 @@ pythonpath = ["src"]
branch = true
source = ["shard_wiki"]
[tool.coverage.report]
show_missing = true
# Quality floor for `pytest --cov` / `coverage report` (not forced on a bare `pytest` run).
fail_under = 90
[tool.ruff]
src = ["src", "tests"]
target-version = "py311"