← Back to issue list

unit tests: minor improvement to fixture usage

View original Github issue

Metadata

Project
snapcraft
Number
#3910
Type
pull request
State
merged
Author
sergiusens
Labels
Created
Updated
Closed

Current evaluation

Merged into main after passing CI and review. The change refactors unit test fixture usage, modifying 8 lines across 2 files with zero impact on code coverage.

Suggested action:

No scores available.

Issue body

Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com> - [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `make lint`? - [ ] Have you successfully run `pytest tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged into main after passing CI and review. The change refactors unit test fixture usage, modifying 8 lines across 2 files with zero impact on code coverage.
qwen3.6-35b-a3b-mtp-q6 Merged into main. The change applies minor improvements to unit test fixture usage. Codecov analysis confirmed no impact on overall test coverage.
qwen3.6-35b-a3b-mtp-q6 Merged into main. The changes improve unit test fixture usage without affecting overall code coverage, as confirmed by Codecov.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#278 tests: additional tests to improve coverage fetch-service merged Merged after two reviews and passing CI checks. Adds additional tests across ten files to improve code coverage, changing +386/-60 lines.
75%
#5375 test: fix command tests snapcraft merged Merged after updating test fixtures to resolve failing command unit tests. Approved by two reviewers, passed CI checks, and modified two files with 17 additions and 9 deletions.
74%
#37 refactor unit tests to simplify the use of fixtures rockcraft closed The suggestion to replace custom fixtures with direct mocker usage was abandoned. Maintainers deemed the refactoring unnecessary and confirmed existing fixtures remain in use across the test suite.
73%
#12 Improved a guard test (fixed the code) and generalized a fixture. craft-cli merged Merged updates that improved a guard test, fixed code, and generalized a fixture for future reuse. Approved by one reviewer, passed CI checks, and modified 4 files with 69 additions and 47 deletions.
73%
#118 tests: use tmp_path instead of mock_path rockcraft merged Merged a unit test fix replacing mock_path with tmp_path to resolve fixture scope issues. Approved by one reviewer, passed CI, and modified 1 file (+3/-3 lines).
72%
#1027 tests: fix broken unit test in master snapcraft merged Merged a one-line fix resolving a broken unit test in master. Approved by one reviewer with no unresolved comments. Changes passed CI and maintained 96.37% code coverage. Integrated directly into the main branch.
72%
#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%.
72%
#3710 tests: use craft-cli lib fixtures snapcraft merged Merged updates to use craft-cli library fixtures in tests. Approved, passed CI, and reduced test code by 89 lines across 11 files without affecting coverage.
71%
#458 test: improve test coverage fetch-service merged Merged after approval from two reviewers and passing CI checks. Added 370 lines of test code across five files to improve overall test coverage.
70%
#4133 tests: ensure test_status tests are self-contained snapcraft merged Merged into main after review approval and passing CI checks. Resolves #4132 by ensuring test_status tests are self-contained. The single-file change adds +3/-3 lines, achieves 100% diff coverage, and leaves overall coverage unchanged.
70%