From 66c5a557ebf5d56dd1a5460622575ecac7636d7e Mon Sep 17 00:00:00 2001 From: Gladyston Franca Date: Wed, 18 Sep 2024 03:03:40 -0300 Subject: [PATCH] Fixing lint issues. --- .../api_v1/endpoints/test_run_executions.py | 15 ++++++++---- app/test_engine/models/test_case.py | 2 +- app/test_engine/test_script_manager.py | 24 ++++++++++++------- .../uploaded_file_support.py | 3 +-- app/utils.py | 4 +--- test_collections/matter/__init__.py | 4 +--- .../support/performance_tests/__init__.py | 4 +++- .../models/python_testing_hooks_proxy.py | 1 - .../performance_tests/models/test_case.py | 11 +++++---- .../performance_tests/models/test_suite.py | 6 ++--- .../scripts/sdk/TC_COMMISSIONING_1_0.py | 23 +++++++++--------- .../scripts/sdk/accessory_manager.py | 6 ++--- .../scripts/sdk/simulated_accessory.py | 3 ++- .../sdk_performance_tests.py | 9 +++---- .../support/performance_tests/utils.py | 22 ++++++++++------- .../support/python_testing/__init__.py | 6 ++--- .../models/python_test_parser.py | 5 +++- .../models/rpc_client/test_harness_client.py | 3 +-- .../python_testing/models/test_case.py | 8 ++++--- .../python_testing/models/test_suite.py | 6 ++--- .../matter/sdk_tests/support/sdk_container.py | 3 ++- .../test_python_script/TC_Sample.py | 4 ++-- .../support/yaml_tests/models/test_case.py | 8 ++++--- 23 files changed, 100 insertions(+), 80 deletions(-) diff --git a/app/api/api_v1/endpoints/test_run_executions.py b/app/api/api_v1/endpoints/test_run_executions.py index 5cf14690..5c7f75d8 100644 --- a/app/api/api_v1/endpoints/test_run_executions.py +++ b/app/api/api_v1/endpoints/test_run_executions.py @@ -39,11 +39,14 @@ selected_tests_from_execution, ) from app.version import version_information +from test_collections.matter.sdk_tests.support.performance_tests.utils import ( + create_summary_report, +) from test_collections.matter.test_environment_config import TestEnvironmentConfigMatter -from test_collections.matter.sdk_tests.support.performance_tests.utils import create_summary_report router = APIRouter() + @router.get("/", response_model=List[schemas.TestRunExecutionWithStats]) def read_test_run_executions( db: Session = Depends(get_db), @@ -483,8 +486,10 @@ def import_test_run_execution( detail=str(error), ) + date_pattern_out_file = "%Y_%m_%d_%H_%M_%S" + @router.post("/{id}/performance_summary") def generate_summary_log( *, @@ -538,9 +543,9 @@ def generate_summary_log( else: timestamp = datetime.now().strftime(date_pattern_out_file) - - tc_name, execution_time_folder = create_summary_report(timestamp, log_lines_list, commissioning_method) - + tc_name, execution_time_folder = create_summary_report( + timestamp, log_lines_list, commissioning_method + ) target_dir = f"{HOST_OUT_FOLDER}/{execution_time_folder}/{tc_name}" url_report = f"{matter_qa_url}/home/displayLogFolder?dir_path={target_dir}" @@ -553,4 +558,4 @@ def generate_summary_log( return JSONResponse( jsonable_encoder(summary_report), **options, - ) \ No newline at end of file + ) diff --git a/app/test_engine/models/test_case.py b/app/test_engine/models/test_case.py index e435beb2..316e1b07 100644 --- a/app/test_engine/models/test_case.py +++ b/app/test_engine/models/test_case.py @@ -62,7 +62,7 @@ def __init__(self, test_case_execution: TestCaseExecution): self.create_test_steps() self.__state = TestStateEnum.PENDING self.errors: List[str] = [] - self.analytics: dict[str:str] = {} # Move to dictionary + self.analytics: dict[str:str] = {} # Move to dictionary # Make pics a class method as they are mostly needed at class level. @classmethod diff --git a/app/test_engine/test_script_manager.py b/app/test_engine/test_script_manager.py index c10e3bc5..ad8f269a 100644 --- a/app/test_engine/test_script_manager.py +++ b/app/test_engine/test_script_manager.py @@ -165,14 +165,14 @@ def ___pending_test_cases_for_test_suite( ) test_cases = [] - if (test_suite.public_id == 'Performance Test Suite'): + if test_suite.public_id == "Performance Test Suite": test_cases = self.__pending_test_cases_for_iterations( test_case=test_case_declaration, iterations=1 ) test_cases[0].test_case_metadata.count = iterations else: - test_cases = self.__pending_test_cases_for_iterations( + test_cases = self.__pending_test_cases_for_iterations( test_case=test_case_declaration, iterations=iterations ) @@ -285,7 +285,7 @@ def __load_test_suite_test_cases( ) -> None: test_suite.test_cases = [] - if (test_suite_declaration.public_id == 'Performance Test Suite'): + if test_suite_declaration.public_id == "Performance Test Suite": test_case_declaration = self.__test_case_declaration( test_case_executions[0].public_id, test_suite_declaration=test_suite_declaration, @@ -293,12 +293,18 @@ def __load_test_suite_test_cases( TestCaseClass = test_case_declaration.class_ref test_case = TestCaseClass(test_case_execution=test_case_executions[0]) - additional_step_count = int(test_case_executions[0].test_case_metadata.count) - 1 + additional_step_count = ( + int(test_case_executions[0].test_case_metadata.count) - 1 + ) - for index in range(2,additional_step_count+2): - test_case.test_steps.insert(index, TestStep(f"Loop Commissioning ... {index}")) + for index in range(2, additional_step_count + 2): + test_case.test_steps.insert( + index, TestStep(f"Loop Commissioning ... {index}") + ) - self.create_pending_teststeps_execution(db, test_case, test_case_executions[0]) + self.create_pending_teststeps_execution( + db, test_case, test_case_executions[0] + ) test_suite.test_cases.append(test_case) else: for test_case_execution in test_case_executions: @@ -309,7 +315,9 @@ def __load_test_suite_test_cases( ) TestCaseClass = test_case_declaration.class_ref test_case = TestCaseClass(test_case_execution=test_case_execution) - self.create_pending_teststeps_execution(db, test_case, test_case_execution) + self.create_pending_teststeps_execution( + db, test_case, test_case_execution + ) test_suite.test_cases.append(test_case) def create_pending_teststeps_execution( diff --git a/app/user_prompt_support/uploaded_file_support.py b/app/user_prompt_support/uploaded_file_support.py index 1d17d183..efb6ed33 100644 --- a/app/user_prompt_support/uploaded_file_support.py +++ b/app/user_prompt_support/uploaded_file_support.py @@ -30,8 +30,7 @@ class UploadFile(Protocol): filename: Optional[str] @property - def content_type(self) -> Optional[str]: - ... + def content_type(self) -> Optional[str]: ... @runtime_checkable diff --git a/app/utils.py b/app/utils.py index 0637952b..f7cc9d64 100644 --- a/app/utils.py +++ b/app/utils.py @@ -41,8 +41,6 @@ class InvalidProgramConfigurationError(Exception): """'Exception raised when the program configuration is invalid""" - pass - def send_email( email_to: str, @@ -168,7 +166,7 @@ def selected_tests_from_execution(run: TestRunExecution) -> TestSelection: for suite in run.test_suite_executions: selected_tests.setdefault(suite.collection_id, {}) selected_tests[suite.collection_id].setdefault(suite.public_id, {}) - suite_dict = selected_tests[suite.collection_id][suite.public_id] + selected_tests[suite.collection_id][suite.public_id] for case in suite.test_case_executions: if ( case.public_id diff --git a/test_collections/matter/__init__.py b/test_collections/matter/__init__.py index 0386a0ae..f4d8a979 100644 --- a/test_collections/matter/__init__.py +++ b/test_collections/matter/__init__.py @@ -18,12 +18,10 @@ # Verify if this execution comes from python_tests_validator. if not os.getenv("DRY_RUN"): from .python_tests import onboarding_payload_collection + from .sdk_tests.support.performance_tests import sdk_performance_collection from .sdk_tests.support.python_testing import ( custom_python_collection, sdk_mandatory_python_collection, sdk_python_collection, ) from .sdk_tests.support.yaml_tests import custom_collection, sdk_collection - from .sdk_tests.support.performance_tests import ( - sdk_performance_collection, - ) \ No newline at end of file diff --git a/test_collections/matter/sdk_tests/support/performance_tests/__init__.py b/test_collections/matter/sdk_tests/support/performance_tests/__init__.py index 99af5d3f..4314cdb6 100644 --- a/test_collections/matter/sdk_tests/support/performance_tests/__init__.py +++ b/test_collections/matter/sdk_tests/support/performance_tests/__init__.py @@ -21,4 +21,6 @@ # Test engine will auto load TestCollectionDeclarations declared inside the package # initializer -sdk_performance_collection: TestCollectionDeclaration = sdk_performance_test_collection() +sdk_performance_collection: TestCollectionDeclaration = ( + sdk_performance_test_collection() +) diff --git a/test_collections/matter/sdk_tests/support/performance_tests/models/python_testing_hooks_proxy.py b/test_collections/matter/sdk_tests/support/performance_tests/models/python_testing_hooks_proxy.py index 7c9f7dee..0da361ee 100644 --- a/test_collections/matter/sdk_tests/support/performance_tests/models/python_testing_hooks_proxy.py +++ b/test_collections/matter/sdk_tests/support/performance_tests/models/python_testing_hooks_proxy.py @@ -19,7 +19,6 @@ from matter_yamltests.hooks import TestRunnerHooks from pydantic import BaseModel -from app.test_engine.logger import test_engine_logger as logger class SDKPythonTestResultEnum(str, Enum): diff --git a/test_collections/matter/sdk_tests/support/performance_tests/models/test_case.py b/test_collections/matter/sdk_tests/support/performance_tests/models/test_case.py index d744983b..d51732f8 100644 --- a/test_collections/matter/sdk_tests/support/performance_tests/models/test_case.py +++ b/test_collections/matter/sdk_tests/support/performance_tests/models/test_case.py @@ -20,7 +20,7 @@ from multiprocessing.managers import BaseManager from pathlib import Path from socket import SocketIO -from typing import Any, Generator, Optional, Type, TypeVar, cast +from typing import Any, Optional, Type, TypeVar from app.models import TestCaseExecution from app.test_engine.logger import PYTHON_TEST_LEVEL @@ -47,7 +47,6 @@ RUNNER_CLASS_PATH, commission_device, generate_command_arguments, - handle_logs, ) @@ -213,9 +212,11 @@ def __class_factory(cls, test: PythonTest, python_test_version: str) -> Type[T]: "python_test": test, "python_test_version": python_test_version, "metadata": { - "public_id": test.name - if python_test_version != CUSTOM_TEST_IDENTIFIER - else test.name + "-" + CUSTOM_TEST_IDENTIFIER, + "public_id": ( + test.name + if python_test_version != CUSTOM_TEST_IDENTIFIER + else test.name + "-" + CUSTOM_TEST_IDENTIFIER + ), "version": "0.0.1", "title": title, "description": test.description, diff --git a/test_collections/matter/sdk_tests/support/performance_tests/models/test_suite.py b/test_collections/matter/sdk_tests/support/performance_tests/models/test_suite.py index dd74b5de..7783734a 100644 --- a/test_collections/matter/sdk_tests/support/performance_tests/models/test_suite.py +++ b/test_collections/matter/sdk_tests/support/performance_tests/models/test_suite.py @@ -73,9 +73,9 @@ def __class_factory(cls, name: str, python_test_version: str) -> Type[T]: "name": name, "python_test_version": python_test_version, "metadata": { - "public_id": name - if python_test_version != "custom" - else name + "-custom", + "public_id": ( + name if python_test_version != "custom" else name + "-custom" + ), "version": "0.0.1", "title": name, "description": name, diff --git a/test_collections/matter/sdk_tests/support/performance_tests/scripts/sdk/TC_COMMISSIONING_1_0.py b/test_collections/matter/sdk_tests/support/performance_tests/scripts/sdk/TC_COMMISSIONING_1_0.py index adf91186..3450ba6f 100644 --- a/test_collections/matter/sdk_tests/support/performance_tests/scripts/sdk/TC_COMMISSIONING_1_0.py +++ b/test_collections/matter/sdk_tests/support/performance_tests/scripts/sdk/TC_COMMISSIONING_1_0.py @@ -17,10 +17,7 @@ import time import logging import subprocess -import chip.clusters as Clusters from chip import ChipDeviceCtrl -from chip.clusters.Types import NullValue -from chip.interaction_model import InteractionModelError, Status from matter_testing_support import ( MatterBaseTest, TestStep, @@ -109,9 +106,8 @@ async def test_TC_COMMISSIONING_1_0(self): except Exception: pass - for i in range(1, interactions+1): - self.additional_steps.insert(i,TestStep(i, f"Loop Commissioning ... {i}")) - + for i in range(1, interactions + 1): + self.additional_steps.insert(i, TestStep(i, f"Loop Commissioning ... {i}")) for i in range(1, interactions + 1): self.step(i) @@ -120,7 +116,9 @@ async def test_TC_COMMISSIONING_1_0(self): f"|============== Begin Commission {i} =========================|" ) - logging.info("|============== Accessory LifeCycle =========================|") + logging.info( + "|============== Accessory LifeCycle =========================|" + ) logging.info("INFO Internal Control reset simulated app ") accessory_manager.clean() @@ -128,16 +126,20 @@ async def test_TC_COMMISSIONING_1_0(self): logging.info("INFO Internal Control start simulated app ") accessory_manager.start() - logging.info("|============== Commissioning Steps =========================|") + logging.info( + "|============== Commissioning Steps =========================|" + ) await self.commission_and_base_checks() time.sleep(0.5) - logging.info("|============== Accessory LifeCycle =========================|") + logging.info( + "|============== Accessory LifeCycle =========================|" + ) logging.info("INFO Internal Control stop simulated app") accessory_manager.stop() accessory_manager.clean() - + def clean_chip_tool_kvs(self): try: subprocess.check_call("rm -f /root/admin_storage.json", shell=True) @@ -148,4 +150,3 @@ def clean_chip_tool_kvs(self): if __name__ == "__main__": default_matter_test_main() - diff --git a/test_collections/matter/sdk_tests/support/performance_tests/scripts/sdk/accessory_manager.py b/test_collections/matter/sdk_tests/support/performance_tests/scripts/sdk/accessory_manager.py index 6292a2db..3b51dfea 100644 --- a/test_collections/matter/sdk_tests/support/performance_tests/scripts/sdk/accessory_manager.py +++ b/test_collections/matter/sdk_tests/support/performance_tests/scripts/sdk/accessory_manager.py @@ -17,6 +17,7 @@ from abc import ABC, abstractmethod + # This interface must be implemented to provide basic access to accessory functionality. class AccessoryInterface(ABC): @abstractmethod @@ -30,7 +31,8 @@ def stop(self): @abstractmethod def clean(self): pass - + + from .simulated_accessory import SimulatedAccessory @@ -47,5 +49,3 @@ def stop(self): def clean(self): self.accessory.clean() - - diff --git a/test_collections/matter/sdk_tests/support/performance_tests/scripts/sdk/simulated_accessory.py b/test_collections/matter/sdk_tests/support/performance_tests/scripts/sdk/simulated_accessory.py index 3759348c..6e967d80 100644 --- a/test_collections/matter/sdk_tests/support/performance_tests/scripts/sdk/simulated_accessory.py +++ b/test_collections/matter/sdk_tests/support/performance_tests/scripts/sdk/simulated_accessory.py @@ -18,6 +18,7 @@ import subprocess from .accessory_manager import AccessoryInterface + class SimulatedAccessory(AccessoryInterface): def __init__(self): @@ -59,4 +60,4 @@ def clean(self): except subprocess.CalledProcessError as e: print( f"Error while trying to remove possible simulator ghost instances: {e}" - ) \ No newline at end of file + ) diff --git a/test_collections/matter/sdk_tests/support/performance_tests/sdk_performance_tests.py b/test_collections/matter/sdk_tests/support/performance_tests/sdk_performance_tests.py index 717c7ead..d737ee52 100644 --- a/test_collections/matter/sdk_tests/support/performance_tests/sdk_performance_tests.py +++ b/test_collections/matter/sdk_tests/support/performance_tests/sdk_performance_tests.py @@ -14,10 +14,8 @@ # limitations under the License. # from pathlib import Path -from typing import Optional from ..models.sdk_test_folder import SDKTestFolder -from ..paths import SDK_CHECKOUT_PATH from .models.python_test_models import PythonTestType from .models.python_test_parser import parse_python_script from .models.test_declarations import ( @@ -32,13 +30,12 @@ # `./models/rpc_client/`. # # This is a temporary solution since those tests should come from SDK. -# +# ### STRESS_TEST_PATH = Path(__file__).resolve().parent / "scripts/sdk/" -STRESS_TEST_FOLDER = SDKTestFolder( - path=STRESS_TEST_PATH, filename_pattern="TC_*" -) +STRESS_TEST_FOLDER = SDKTestFolder(path=STRESS_TEST_PATH, filename_pattern="TC_*") + def _init_test_suites( python_test_version: str, diff --git a/test_collections/matter/sdk_tests/support/performance_tests/utils.py b/test_collections/matter/sdk_tests/support/performance_tests/utils.py index 42e65771..296644a7 100644 --- a/test_collections/matter/sdk_tests/support/performance_tests/utils.py +++ b/test_collections/matter/sdk_tests/support/performance_tests/utils.py @@ -24,9 +24,12 @@ date_pattern_out_folder = "%d-%m-%Y_%H-%M-%S-%f" datetime_json_pattern = "%Y-%m-%dT%H:%M:%S.%f" + # Creates the file structure and content required by matter_qa visualization tool. # Returns the test case name and the folder name where the report is save. -def create_summary_report(timestamp: str, log_lines: list, commissioning_method: str) -> tuple[str, str]: +def create_summary_report( + timestamp: str, log_lines: list, commissioning_method: str +) -> tuple[str, str]: log_lines_list = "\n".join(log_lines) @@ -178,7 +181,7 @@ def create_summary_report(timestamp: str, log_lines: list, commissioning_method: ) return (tc_name, execution_time_folder) - + def compute_state(execution_status: list) -> str: if any(tc for tc in execution_status if tc == "CANCELLED"): @@ -250,12 +253,12 @@ def generate_summary( summary_dict["test_summary_record"]["number_of_iterations_completed"] = len( durations ) - summary_dict["test_summary_record"][ - "number_of_iterations_passed" - ] = compute_count_state(execution_status, True) - summary_dict["test_summary_record"][ - "number_of_iterations_failed" - ] = compute_count_state(execution_status, False) + summary_dict["test_summary_record"]["number_of_iterations_passed"] = ( + compute_count_state(execution_status, True) + ) + summary_dict["test_summary_record"]["number_of_iterations_failed"] = ( + compute_count_state(execution_status, False) + ) summary_dict["test_summary_record"]["platform"] = "rpi" summary_dict["test_summary_record"]["commissioning_method"] = commissioning_method summary_dict["test_summary_record"]["list_of_iterations_failed"] = [] @@ -359,6 +362,7 @@ def extract_datetime(line: str) -> Optional[datetime]: return line_datetime + class Commissioning: stages = { "discovery": { @@ -408,4 +412,4 @@ def add_event(self, line: str) -> None: end = datetime.strptime(match[0], "%Y-%m-%d %H:%M:%S.%f") if stage == "cleanup": self.commissioning["end"] = end - self.commissioning[stage]["end"] = end \ No newline at end of file + self.commissioning[stage]["end"] = end diff --git a/test_collections/matter/sdk_tests/support/python_testing/__init__.py b/test_collections/matter/sdk_tests/support/python_testing/__init__.py index 6ffac78f..85b5ca8e 100644 --- a/test_collections/matter/sdk_tests/support/python_testing/__init__.py +++ b/test_collections/matter/sdk_tests/support/python_testing/__init__.py @@ -34,6 +34,6 @@ sdk_mandatory_python_test_collection() ) - custom_python_collection: Optional[ - TestCollectionDeclaration - ] = custom_python_test_collection() + custom_python_collection: Optional[TestCollectionDeclaration] = ( + custom_python_test_collection() + ) diff --git a/test_collections/matter/sdk_tests/support/python_testing/models/python_test_parser.py b/test_collections/matter/sdk_tests/support/python_testing/models/python_test_parser.py index 66d50459..715a8ee6 100644 --- a/test_collections/matter/sdk_tests/support/python_testing/models/python_test_parser.py +++ b/test_collections/matter/sdk_tests/support/python_testing/models/python_test_parser.py @@ -89,7 +89,10 @@ def __test_classes(module: ast.Module) -> list[ast.ClassDef]: for c in module.body if isinstance(c, ast.ClassDef) and any( - b for b in c.bases if isinstance(b, ast.Name) and (b.id == "MatterBaseTest" or b.id == "MatterQABaseTestCaseClass") + b + for b in c.bases + if isinstance(b, ast.Name) + and (b.id == "MatterBaseTest" or b.id == "MatterQABaseTestCaseClass") ) ] diff --git a/test_collections/matter/sdk_tests/support/python_testing/models/rpc_client/test_harness_client.py b/test_collections/matter/sdk_tests/support/python_testing/models/rpc_client/test_harness_client.py index a7e7ae67..f8c0dab4 100644 --- a/test_collections/matter/sdk_tests/support/python_testing/models/rpc_client/test_harness_client.py +++ b/test_collections/matter/sdk_tests/support/python_testing/models/rpc_client/test_harness_client.py @@ -18,11 +18,10 @@ # flake8: noqa import importlib +import subprocess import sys from contextlib import redirect_stdout from multiprocessing.managers import BaseManager -import subprocess - try: from matter_yamltests.hooks import TestRunnerHooks diff --git a/test_collections/matter/sdk_tests/support/python_testing/models/test_case.py b/test_collections/matter/sdk_tests/support/python_testing/models/test_case.py index c39ff974..922a3090 100644 --- a/test_collections/matter/sdk_tests/support/python_testing/models/test_case.py +++ b/test_collections/matter/sdk_tests/support/python_testing/models/test_case.py @@ -200,9 +200,11 @@ def __class_factory( "python_test": test, "python_test_version": python_test_version, "metadata": { - "public_id": test.name - if python_test_version != CUSTOM_TEST_IDENTIFIER - else test.name + "-" + CUSTOM_TEST_IDENTIFIER, + "public_id": ( + test.name + if python_test_version != CUSTOM_TEST_IDENTIFIER + else test.name + "-" + CUSTOM_TEST_IDENTIFIER + ), "version": "0.0.1", "title": title, "description": test.description, 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 943522b4..755d4575 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,9 @@ 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 if python_test_version != "custom" else name + "-custom" + ), "version": "0.0.1", "title": name, "description": name, diff --git a/test_collections/matter/sdk_tests/support/sdk_container.py b/test_collections/matter/sdk_tests/support/sdk_container.py index 538d96c1..26ef8461 100644 --- a/test_collections/matter/sdk_tests/support/sdk_container.py +++ b/test_collections/matter/sdk_tests/support/sdk_container.py @@ -86,6 +86,7 @@ "/root/python_testing/scripts/sdk/simulated_accessory.py" ) + class SDKContainerNotRunning(Exception): """Raised when we attempt to use the docker container, but it is not running""" @@ -240,7 +241,7 @@ def send_command( socket=is_socket, stream=is_stream, stdin=True, - detach =is_detach, + detach=is_detach, ) return result diff --git a/test_collections/matter/sdk_tests/support/tests/python_tests/test_python_script/TC_Sample.py b/test_collections/matter/sdk_tests/support/tests/python_tests/test_python_script/TC_Sample.py index 7752e5d2..ed8c6dbd 100644 --- a/test_collections/matter/sdk_tests/support/tests/python_tests/test_python_script/TC_Sample.py +++ b/test_collections/matter/sdk_tests/support/tests/python_tests/test_python_script/TC_Sample.py @@ -52,7 +52,7 @@ def test_TC_Commissioning_Sample(self): print("Test execution") def pics_TC_Commissioning_Sample(self): - pics = ["PICS"] + pass class TC_No_Commissioning_Sample(MatterBaseTest): @@ -71,7 +71,7 @@ def test_TC_No_Commissioning_Sample(self): print("Test execution") def pics_TC_No_Commissioning_Sample(self): - pics = ["PICS"] + pass class TC_Legacy_Sample(MatterBaseTest): diff --git a/test_collections/matter/sdk_tests/support/yaml_tests/models/test_case.py b/test_collections/matter/sdk_tests/support/yaml_tests/models/test_case.py index 14496155..01ed130c 100644 --- a/test_collections/matter/sdk_tests/support/yaml_tests/models/test_case.py +++ b/test_collections/matter/sdk_tests/support/yaml_tests/models/test_case.py @@ -104,9 +104,11 @@ def __class_factory(cls, test: YamlTest, yaml_version: str) -> Type[T]: "yaml_version": yaml_version, "chip_test_identifier": class_name, "metadata": { - "public_id": identifier - if yaml_version != CUSTOM_TEST_IDENTIFIER - else identifier + "-" + CUSTOM_TEST_IDENTIFIER, + "public_id": ( + identifier + if yaml_version != CUSTOM_TEST_IDENTIFIER + else identifier + "-" + CUSTOM_TEST_IDENTIFIER + ), "version": "0.0.1", "title": title, "description": test.name,