Skip to content
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 3 additions & 20 deletions src/python_testing/TC_IDM_1_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,36 +34,19 @@
# quiet: true
# === END CI TEST ARGUMENTS ===

import inspect
import logging
import random
from dataclasses import dataclass

from mobly import asserts
from support_modules.idm_support import IDMBaseTest, client_cmd, get_all_cmds_for_cluster_id

import matter.clusters as Clusters
import matter.discovery as Discovery
from matter import ChipUtility
from matter.exceptions import ChipStackError
from matter.interaction_model import InteractionModelError, Status
from matter.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main, matchers


def get_all_cmds_for_cluster_id(cid: int) -> list[Clusters.ClusterObjects.ClusterCommand]:
cluster = Clusters.ClusterObjects.ALL_CLUSTERS[cid]
try:
return inspect.getmembers(cluster.Commands, inspect.isclass)
except AttributeError:
return []


def client_cmd(cmd_class):
# Inspect returns all the classes, not just the ones we want, so use a try
# here incase we're inspecting a builtin class
try:
return cmd_class if cmd_class.is_client else None
except AttributeError:
return None
from matter.testing.matter_testing import async_test_body, default_matter_test_main, matchers

# one of the steps in this test requires sending a command that requires a timed interaction
# without first sending the TimedRequest action
Expand All @@ -78,7 +61,7 @@ def must_use_timed_invoke(cls) -> bool:
return False


class TC_IDM_1_2(MatterBaseTest):
class TC_IDM_1_2(IDMBaseTest):

@async_test_body
async def test_TC_IDM_1_2(self):
Expand Down
5 changes: 3 additions & 2 deletions src/python_testing/TC_IDM_1_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,19 @@
import logging

from mobly import asserts
from support_modules.idm_support import IDMBaseTest

import matter.clusters as Clusters
from matter.exceptions import ChipStackError
from matter.interaction_model import InteractionModelError, Status
from matter.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, matchers
from matter.testing.matter_testing import TestStep, async_test_body, default_matter_test_main, matchers

# If DUT supports `MaxPathsPerInvoke > 1`, additional command line argument
# run with
# --hex-arg PIXIT.DGGEN.TEST_EVENT_TRIGGER_KEY:<key>


class TC_IDM_1_4(MatterBaseTest):
class TC_IDM_1_4(IDMBaseTest):

def steps_TC_IDM_1_4(self) -> list[TestStep]:
steps = [TestStep(1, "Get remote node's MaxPathsPerInvoke", is_commissioning=True),
Expand Down
Loading
Loading