From 0ac71ea1cc32daec8ae824f9bf4ae73d61fdb4fc Mon Sep 17 00:00:00 2001 From: "Commentator2.0" Date: Tue, 14 Oct 2025 20:23:19 +0200 Subject: [PATCH] tests/functional2/lang: fix wrong unused file error for generic test group collection Change-Id: I1c548fcebe45d2a6621987091e3a852b8a9b5765 --- tests/functional2/lang/lang_util.py | 1 + tests/functional2/lang/test_lang_infra.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/functional2/lang/lang_util.py b/tests/functional2/lang/lang_util.py index 7302ab2e9..dfcd9048d 100644 --- a/tests/functional2/lang/lang_util.py +++ b/tests/functional2/lang/lang_util.py @@ -361,6 +361,7 @@ def _collect_generic_test_group(folder: Path) -> tuple[list[LangTest], list[Inva # Skipping collection to avoid duplicate collection # when both `.err.exp` and `.out.exp` are provided # in case of non-error traces + unused -= {file.name} continue collected |= {test_name} full_name = LANG_TEST_ID_PATTERN.format(folder_name=parent_name, test_name=test_name) diff --git a/tests/functional2/lang/test_lang_infra.py b/tests/functional2/lang/test_lang_infra.py index 82f1bc73c..4c0b89a4b 100644 --- a/tests/functional2/lang/test_lang_infra.py +++ b/tests/functional2/lang/test_lang_infra.py @@ -858,4 +858,5 @@ def test_generic_missing_in_file(pytest_command: Command): ) ) def test_generic_no_duplicate_collection(pytest_command: Command): - pytest_command.run().ok() + res = pytest_command.run().ok() + assert "test_invalid_configuration[name0-reasons0] SKIPPED" in res.stdout_plain