Files
Claude 5240d0dcda test: expand coverage for context, quality, search, overnight, python
Add tests for previously untested surface area:
- internal/context: pure helpers for readiness classification, action
  mapping, display formatting, timestamp parsing, tmux target parsing,
  file-tail reading (23.9% -> 41.2%)
- internal/quality: golden signals math (linear regression, Gini coefficient,
  top-10/bottom ratio, citation counting, verdict computation) (15.3% -> 27.9%)
- internal/search: findings parsing (frontmatter, title extraction,
  freshness scoring), bead context resolution (env + cache + keywords),
  constraint index (load, save, lock, filter stale) (8.7% -> 22.4%)
- internal/overnight: loop helpers (validateRunLoopOptions, summary
  round-trips, snapshot partitioning, test fault injector hook) (77.4% -> 78%)
- internal/goals: platform-specific process-group tests for
  measure_unix.go (track/untrack/killAllChildren)
- tests/python: unittest-based tests for generate-context-shards.py
  covering is_binary, count_lines, units_for_file, pack_shards,
  verify_manifest, build_manifest (22 tests; runs under vanilla python3)
- tests/scripts: behavioral tests for ci-local-release.sh flag parsing
  and validation (17 bats cases)

https://claude.ai/code/session_01EMusoGMSUSbtPqkotJy3U7
2026-04-22 11:53:01 +00:00

14 lines
505 B
Bash
Executable File

#!/usr/bin/env bash
# run-tests.sh — run Python unit tests without requiring pytest.
#
# Uses stdlib unittest so it works anywhere python3 is installed. CI jobs that
# already have pytest can also run `pytest tests/python/` — the tests inherit
# from unittest.TestCase so both runners work.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
cd "$REPO_ROOT"
exec python3 -m unittest discover -s tests/python -p 'test_*.py' "$@"