← Back to issue list

tests: test lifecycle.py::_run_in_provider

View original Github issue

Metadata

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

Current evaluation

Merged unit tests for lifecycle.py::_run_in_provider(), increasing coverage from 16% to 36%. Approved by one reviewer, passed CI, and added 144 lines across three files.

Suggested action:

No scores available.

Issue body

- [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? ----- New unit tests for `lifecycle.py::_run_in_provider()`. I referenced `charmcraft`'s unit testing, but it was still quite challenging to mock. Before: ``` Name Stmts Miss Cover -------------------------------------------- rockcraft/lifecycle.py 90 76 16% ``` After: ``` Name Stmts Miss Cover -------------------------------------------- rockcraft/lifecycle.py 90 58 36% ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged unit tests for lifecycle.py::_run_in_provider(), increasing coverage from 16% to 36%. Approved by one reviewer, passed CI, and added 144 lines across three files.
qwen3.6-35b-a3b-mtp-q6 Merged unit tests for lifecycle.py::_run_in_provider() by mr-cal. The commit improved rockcraft/lifecycle.py coverage from 16% to 36% by implementing mocks for provider execution.
qwen3.6-35b-a3b-mtp-q6 Merged unit tests for lifecycle.py::_run_in_provider() that increased code coverage from 16% to 36%. The changes implement mocking for complex provider interactions using charmcraft testing patterns.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3928 tests: mock and test provider calls from lifecycle.py snapcraft merged Merged unit tests mocking craft-providers calls in lifecycle.py. Simplified verbosity handling to align with charmcraft and rockcraft. Approved, passed CI, and increased overall test coverage by 0.10% with 100% diff coverage.
73%
#3719 tests: fix lifecycle tests to run on new directory snapcraft merged Merged a fix for lifecycle tests to run in a new directory instead of the current one. Approved by a reviewer, passed CI, and changed three lines.
72%
#2163 tests: add lifecycle ordering tests snapcraft merged Merged changes adding lifecycle ordering tests and refactoring them into a dedicated package. Approved by a reviewer, passed CI checks, and increased code coverage by 0.02%.
71%
#130 fix(test): fix provider integration tests craft-application merged Merged to main. Fixed provider integration tests by modifying one file (+3/-9 lines). Achieved 100% diff coverage with no impact on overall metrics. Approved by two reviewers and passed CI checks prior to merge.
71%