Skip to content

Run unittest discovery in the coverage target - #79

Merged
stefankoegl merged 1 commit into
stefankoegl:masterfrom
x0Lazarus:fix/coverage-test-runner
Oct 1, 2026
Merged

stefankoegl merged 1 commit into
stefankoegl:masterfrom
x0Lazarus:fix/coverage-test-runner

Conversation

@x0Lazarus

Copy link
Copy Markdown
Contributor

Follow up on #54's move to unittest discovery: make coverage still executes tests.py directly, which now defines the tests without running them. This lets the CI test command succeed without exercising the suite.

Invoke unittest through coverage so the target runs both unit tests and the load_tests doctests, and returns a failure when a test fails.

Validated on Windows / Python 3.12 by executing the recipe commands directly; GNU make was unavailable:

  • The unchanged suite runs 28 passing tests, including doctests, with 100% statement/branch coverage.
  • A deliberately failing test in a temporary copy was ignored by the old command (exit 0) and detected by the corrected command (exit 1).
  • flake8 passes.

The hosted Ubuntu / Python 3.10-3.14 matrix remains unverified locally.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The coverage target now correctly discovers tests and propagates failures.

Review effort: Balanced
Findings: None

What changed in this PR

Updates the coverage target to run the discovered test suite and doctests.

Changes:

  • Runs unittest through coverage instead of executing tests.py directly.
File Description
makefile Corrects the coverage test invocation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@stefankoegl
stefankoegl merged commit f15abac into stefankoegl:master Oct 1, 2026
6 checks passed
@stefankoegl

Copy link
Copy Markdown
Owner

Thanks!

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.

3 participants