← Back to issue list

ci: do not check coverage of tests dir

View original Github issue

Metadata

Project
snapcraft
Number
#4222
Type
pull request
State
merged
Author
mr-cal
Labels
Created
Updated
Closed

Current evaluation

Merged to exclude the tests directory from pytest coverage checks. Approved by one reviewer, passed CI, and integrated into main. Coverage metrics now accurately reflect only production code.

Suggested action:

No scores available.

Issue body

- [X] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [X] Have you successfully run `make lint`? - [X] Have you successfully run `pytest tests/unit`? ----- `pytest` was checking the coverage of the `tests` dir. For example: <kbd>![image](https://github.com/snapcore/snapcraft/assets/60674096/7c451c21-ebde-4878-bb3b-39c5fb0a7c56)</kbd>

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged to exclude the tests directory from pytest coverage checks. Approved by one reviewer, passed CI, and integrated into main. Coverage metrics now accurately reflect only production code.
qwen3.6-35b-a3b-mtp-q6 Merged CI configuration changes to exclude the tests directory from pytest coverage checks, preventing inaccurate metrics. Successfully integrated into main with expected coverage adjustments noted by Codecov.
qwen3.6-35b-a3b-mtp-q6 Merged CI configuration to exclude the tests directory from pytest coverage checks. This resolves incorrect metrics by preventing test files from skewing coverage reports, despite a noted overall percentage decrease.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#114 ci: use source dir for pytest coverage starbase closed Merged to update CI configuration, directing pytest coverage to use the source directory. The one-line change was applied without additional review.
76%
#3728 ci: disable Python 3.9 unit testing snapcraft merged Merged a one-line CI configuration change to disable Python 3.9 unit testing. Approved by a reviewer, passed all checks, and increased overall test coverage by 0.44%.
71%
#107 ci: separate unit and integration tests starbase merged Merged into main after approval and passing CI checks. The PR separated unit and integration tests in the CI pipeline, modifying two files (+46/-7 lines). Code coverage remained unchanged at 100%.
70%