← Back to issue list

tests (templates): Use pytest fixtures and asserts instead of unittest

View original Github issue

Metadata

Project
charmcraft
Number
#1551
Type
pull request
State
merged
Author
Batalex
Labels
—
Created
Updated
Closed

Current evaluation

Merged in PR #1551 via commit daf5a5b9, migrating template tests from unittest to pytest fixtures and plain assertions.

Resolution: closed resolved

Reason: PR #1551 was approved and merged as commit daf5a5b9, completing the template-test migration to pytest.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Related to https://github.com/canonical/operator/issues/1110. I kept the changes as minimal as possible.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged in PR #1551 via commit daf5a5b9, migrating template tests from unittest to pytest fixtures and plain assertions.
stealth/space-bunny-alpha — closed resolved Merged the template-test migration from unittest to pytest fixtures and plain assertions, implementing work linked to canonical/operator#1110.
qwen/qwen3.6-35b-a3b — — Merged PR replacing unittest with pytest fixtures and asserts in template tests. After resolving a CLA check failure caused by a private Launchpad email, the contributor signed the agreement, CI passed, and the changes were approved by four reviewers.
qwen3.6-35b-a3b-mtp-q6 — — Merged after resolving CLA verification delays from a private Launchpad email. Updates template tests to use pytest fixtures and assertions instead of unittest, including minor linter formatting adjustments.

Update history

No update history recorded yet.

Related work

  • Related To: operator#1110 (confidence 100%)

    The PR description explicitly identifies operator issue #1110 as the related motivation.

Related issues

Issue Project State Summary Similarity
#3167 unit tests: move to pytest snapcraft merged Merged PR #3167 in commit 788475f62, migrating unit tests from testscenarios to pytest, adding fixtures and pytest-cov, and retaining unittest for integration tests.
72%