From 5b50541f95a3c218d2009b289681375eb265d566 Mon Sep 17 00:00:00 2001 From: Romulo Quidute Filho <116586593+rquidute@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:56:26 -0300 Subject: [PATCH] Fix suite names for custom python tests (#168) --- .../support/python_testing/models/test_suite.py | 4 +--- .../support/python_testing/sdk_python_tests.py | 13 +++++++++---- .../support/yaml_tests/models/test_suite.py | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/test_collections/matter/sdk_tests/support/python_testing/models/test_suite.py b/test_collections/matter/sdk_tests/support/python_testing/models/test_suite.py index 6574d8aa..55e597b8 100644 --- a/test_collections/matter/sdk_tests/support/python_testing/models/test_suite.py +++ b/test_collections/matter/sdk_tests/support/python_testing/models/test_suite.py @@ -85,9 +85,7 @@ def __class_factory( "name": name, "python_test_version": python_test_version, "metadata": { - "public_id": ( - name if python_test_version != "custom" else name + "-custom" - ), + "public_id": name, "version": "0.0.1", "title": name, "description": name, diff --git a/test_collections/matter/sdk_tests/support/python_testing/sdk_python_tests.py b/test_collections/matter/sdk_tests/support/python_testing/sdk_python_tests.py index 847e811c..18503c06 100644 --- a/test_collections/matter/sdk_tests/support/python_testing/sdk_python_tests.py +++ b/test_collections/matter/sdk_tests/support/python_testing/sdk_python_tests.py @@ -55,25 +55,30 @@ def _init_test_suites( python_test_version: str, ) -> dict[SuiteType, PythonSuiteDeclaration]: + # Append `custom` text in order to differ from the regular suite name + version: str = "" + if python_test_version == "custom": + version += "-custom" + return { SuiteType.MANDATORY: PythonSuiteDeclaration( - name="Python Testing Suite - Mandatories", + name="Python Testing Suite - Mandatories" + version, suite_type=SuiteType.MANDATORY, version=python_test_version, mandatory=True, ), SuiteType.COMMISSIONING: PythonSuiteDeclaration( - name="Python Testing Suite", + name="Python Testing Suite" + version, suite_type=SuiteType.COMMISSIONING, version=python_test_version, ), SuiteType.NO_COMMISSIONING: PythonSuiteDeclaration( - name="Python Testing Suite - No commissioning", + name="Python Testing Suite - No commissioning" + version, suite_type=SuiteType.NO_COMMISSIONING, version=python_test_version, ), SuiteType.LEGACY: PythonSuiteDeclaration( - name="Python Testing Suite - Old script format", + name="Python Testing Suite - Old script format" + version, suite_type=SuiteType.LEGACY, version=python_test_version, ), diff --git a/test_collections/matter/sdk_tests/support/yaml_tests/models/test_suite.py b/test_collections/matter/sdk_tests/support/yaml_tests/models/test_suite.py index f055b9e3..1106be5a 100644 --- a/test_collections/matter/sdk_tests/support/yaml_tests/models/test_suite.py +++ b/test_collections/matter/sdk_tests/support/yaml_tests/models/test_suite.py @@ -78,7 +78,7 @@ def __class_factory(cls, name: str, yaml_version: str) -> Type[T]: "name": name, "yaml_version": yaml_version, "metadata": { - "public_id": name if yaml_version != "custom" else name + "-custom", + "public_id": name, "version": "0.0.1", "title": name, "description": name,