Skip to content

fix(ticket-005): support coverage.py 7.x contexts, resilient pytest runner and src pythonpath - #9

Merged
tom-sapletta-com merged 1 commit into
mainfrom
ticket/005-fix-coverage-contexts-and-scan-runner
Sep 27, 2026
Merged

tom-sapletta-com merged 1 commit into
mainfrom
ticket/005-fix-coverage-contexts-and-scan-runner

Conversation

@tom-sapletta-com

Copy link
Copy Markdown
Contributor

Summary

  • Fix load_coverage_json to support real coverage.py 7.x schema with line-number keys ({line_str: [contexts]}) alongside legacy mock schema ({context: [lines]}), resolving inverted mapping where lines became tests and tests became lines.
  • Make run_pytest resilient: detect if pytest-json-report is installed before passing --json-report, and run coverage json --show-contexts with isolated COVERAGE_FILE so coverage.json always contains line contexts without SQLite context table collisions.
  • Add pythonpath = ["src"] to [tool.pytest.ini_options] in pyproject.toml so tests run seamlessly without manual PYTHONPATH exports.
  • Add __main__.py entrypoint and executable guard in cli.py.
  • All 49 unit tests pass, and testless scan, testless duplicates, testless doctor and testless planfiles work end-to-end.

…unner and src pythonpath

Co-authored-by: Koru Agent <agent@coru.dev>
@tom-sapletta-com
tom-sapletta-com merged commit c46847f into main Sep 27, 2026
3 checks passed
@tom-sapletta-com
tom-sapletta-com deleted the ticket/005-fix-coverage-contexts-and-scan-runner branch September 27, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant