From a393d9c83a7d16c5080a50afe1beea1d20f54154 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 6 Dec 2025 03:07:59 +0000 Subject: [PATCH 1/2] Initial plan From c576f82bb32d07f85626203ad9d33540a0b1f1b3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 6 Dec 2025 03:16:51 +0000 Subject: [PATCH 2/2] fix: add explicit test IDs to environment parametrizations Add explicit test IDs (`default-env`, `custom-env`) to environment parametrizations in AlmaLinux, CentOS 7, and Ubuntu BuildD base tests. This prevents pytest from generating test IDs with embedded newline characters from byte string values, which were causing test setup errors. Fixes test setup errors like: ERROR at setup of test_setup[...-environment1-https_proxy=http://foo.bar:8081\nPATH=/snap\nhttp_proxy=http://foo.bar:8080\n-AlmaLinuxBaseAlias.NINE] Co-authored-by: lengau <4305943+lengau@users.noreply.github.com> --- tests/unit/bases/test_almalinux.py | 2 ++ tests/unit/bases/test_centos_7.py | 2 ++ tests/unit/bases/test_ubuntu_buildd.py | 2 ++ 3 files changed, 6 insertions(+) diff --git a/tests/unit/bases/test_almalinux.py b/tests/unit/bases/test_almalinux.py index 099f9b674..4ab2431e9 100644 --- a/tests/unit/bases/test_almalinux.py +++ b/tests/unit/bases/test_almalinux.py @@ -95,6 +95,7 @@ def mock_get_os_release(mocker): ), ), ], + ids=["default-env", "custom-env"], ) @pytest.mark.parametrize("no_cdn", [False, True]) @pytest.mark.parametrize( @@ -1146,6 +1147,7 @@ def test_ensuresetup_completed_not_setup(status, fake_executor, mock_load): "http_proxy": "http://foo.bar:8080", }, ], + ids=["default-env", "custom-env"], ) @pytest.mark.parametrize("cache_path", [None, pathlib.Path("/tmp")]) def test_warmup_overall( diff --git a/tests/unit/bases/test_centos_7.py b/tests/unit/bases/test_centos_7.py index bb604e516..26b2afd6b 100644 --- a/tests/unit/bases/test_centos_7.py +++ b/tests/unit/bases/test_centos_7.py @@ -94,6 +94,7 @@ def mock_get_os_release(mocker): ), ), ], + ids=["default-env", "custom-env"], ) @pytest.mark.parametrize("no_cdn", [False, True]) @pytest.mark.parametrize( @@ -1082,6 +1083,7 @@ def test_ensure_setup_completed_not_setup(status, fake_executor, mock_load): "http_proxy": "http://foo.bar:8080", }, ], + ids=["default-env", "custom-env"], ) @pytest.mark.parametrize("cache_path", [None, pathlib.Path("/tmp")]) def test_warmup_overall( diff --git a/tests/unit/bases/test_ubuntu_buildd.py b/tests/unit/bases/test_ubuntu_buildd.py index 565a498b4..0ab67005d 100644 --- a/tests/unit/bases/test_ubuntu_buildd.py +++ b/tests/unit/bases/test_ubuntu_buildd.py @@ -126,6 +126,7 @@ def fake_update_commands(fake_process): ), ), ], + ids=["default-env", "custom-env"], ) @pytest.mark.parametrize("no_cdn", [False, True]) @pytest.mark.parametrize( @@ -1269,6 +1270,7 @@ def test_ensure_setup_completed_not_setup(status, fake_executor, mock_load): "http_proxy": "http://foo.bar:8080", }, ], + ids=["default-env", "custom-env"], ) @pytest.mark.parametrize("cache_path", [None, pathlib.Path("/tmp")]) def test_warmup_overall(