From 652cb745e480aa207fc9eea7d1947e1a4c0e7e5a Mon Sep 17 00:00:00 2001 From: Manish Sah Date: Fri, 17 Oct 2025 07:59:07 +0545 Subject: [PATCH] test: Convert test_alpine.py from unittest to pytest Refactored tests/unittests/distros/test_alpine.py to use pytest instead of unittest.TestCase as part of the pytest migration effort. - Removed TestCase inheritance - Maintained all original test functionality Related: canonical#6427 --- tests/unittests/distros/test_alpine.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/unittests/distros/test_alpine.py b/tests/unittests/distros/test_alpine.py index 2c8daaeb123..6e301d404af 100644 --- a/tests/unittests/distros/test_alpine.py +++ b/tests/unittests/distros/test_alpine.py @@ -5,7 +5,6 @@ import pytest from cloudinit import distros, util -from tests.unittests.helpers import TestCase class TestAlpineBusyboxUserGroup: @@ -50,7 +49,7 @@ def test_busybox_add_user(self, m_which, m_subp, tmpdir): assert contents == expected -class TestAlpineShadowUserGroup(TestCase): +class TestAlpineShadowUserGroup: distro = distros.fetch("alpine")("alpine", {}, None) @mock.patch("cloudinit.distros.alpine.subp.subp")