refactor unit tests to simplify the use of fixtures
Metadata
Current evaluation
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.
Suggested action: —
No scores available.
Issue body
It would be simpler to use `mocker` instead in most cases.
For example, in `test_oci.py`:
```
@pytest.fixture
def mock_run(mocker):
yield mocker.patch("rockcraft.oci._process_run")
```
could be deleted and instead a `mocker` could be used in whatever test methods need this fixture.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | 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. | |
| qwen/qwen3.6-35b-a3b | — | — | The fixture refactoring request was abandoned without implementation. Maintainers noted it is no longer a priority, as fixtures remain in use across the codebase. The task was deferred for future grooming. | |
| qwen/qwen3.6-35b-a3b | — | — | The proposed fixture refactoring was abandoned. Maintainers deemed the change unnecessary, noting that custom fixtures remain in use across all unit tests. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without implementation. Maintainer determined the fixture refactoring is unnecessary as existing fixtures remain in use across unit tests. The request was deferred for future grooming. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Abandoned. Maintainers determined the refactoring is unnecessary, as custom fixtures remain required across the test suite. Closed without changes. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3910 unit tests: minor improvement to fixture usage | snapcraft | merged | 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. |