feat: add Python test coverage#4841
Merged
Merged
Conversation
0ecf8b6 to
a955ec6
Compare
Collaborator
|
I added Windows support. Can you check the changes? Are we planning to enforce 100% coverage? Do we have a plan on how to tackle Qt? |
Contributor
Author
|
Thanks @abdnh! Ideally, we wish to achieve 100% coverage but not in a row. For the first moment, we want to add a coverage test to ensure which parts of the codebase are tested and which are not. Then, with this information, we'll plan the next steps. |
abdnh
approved these changes
May 15, 2026
Add just test-py with --coverage and --html flag support, backed by coverage.py. Runs pylib and qt test suites separately, writes data to out/coverage/, and enforces minimum line thresholds (65% pylib, 20% qt). Closes #4838
Update just test to accept --coverage and --html, delegating to a new coverage recipe. Currently covers Python only.
d422c9e to
37186c6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue
Closes #4838
Summary/motivation
Adds
coverage.py-based test coverage for both Python test suites (pylibandqt). Introducesjust test-py --coverageandjust test-py --coverage --html, plus thejust test --coverage.Coverage reports are written to
out/coverage/.How to test
Checklist (minimum)
./ninja checkor an equivalent relevant check locally.Details
coveragedependency pinned to >=7.13.5 in pyproject.toml.coverageumbrella recipe currently delegates to Python only for nowBefore / after behavior
Before: no
just test-py, no coverage support.After:
just test-pyruns Python tests via ninja;just test-py --coverageruns them with
coverage.pyand enforces minimum line coverage.