17
17
18
18
import asyncio
19
19
import importlib
20
- import sys
21
20
import logging
22
- import typing
23
21
import os
24
- from typing import Optional
22
+ import sys
23
+ import typing
24
+ from dataclasses import dataclass
25
+ from datetime import datetime , timedelta , timezone
25
26
from pathlib import Path
27
+ from typing import Optional
26
28
from unittest .mock import MagicMock
27
- from dataclasses import dataclass
28
- from datetime import datetime , timezone , timedelta
29
29
30
30
from chip .clusters import Attribute
31
+ from mobly import signals
31
32
from mobly .config_parser import ENV_MOBLY_LOGPATH , TestRunConfig
32
33
from mobly .test_runner import TestRunner
33
- from mobly import signals
34
+
34
35
try :
35
36
from matter_yamltests .hooks import TestRunnerHooks
36
37
except ImportError :
@@ -50,6 +51,7 @@ def StartFromString(self, destination):
50
51
pass
51
52
52
53
from typing import TYPE_CHECKING
54
+
53
55
if TYPE_CHECKING :
54
56
from chip .testing .matter_testing import MatterTestConfig
55
57
@@ -152,7 +154,7 @@ def default_matter_test_main():
152
154
default_matter_test_main()
153
155
"""
154
156
155
- from chip .testing .matter_testing import parse_matter_test_args , _find_test_class
157
+ from chip .testing .matter_testing import _find_test_class , parse_matter_test_args
156
158
157
159
matter_test_config = parse_matter_test_args ()
158
160
@@ -184,10 +186,10 @@ def run_tests_no_exit(test_class, matter_test_config,
184
186
event_loop : asyncio .AbstractEventLoop , hooks : TestRunnerHooks ,
185
187
default_controller = None , external_stack = None ) -> bool :
186
188
187
- from chip .testing .matter_testing import MatterStackState , stash_globally
188
-
189
189
# Lazy import to avoid circular dependency
190
190
from typing import TYPE_CHECKING
191
+
192
+ from chip .testing .matter_testing import MatterStackState , stash_globally
191
193
if TYPE_CHECKING :
192
194
from chip .testing .matter_testing import CommissionDeviceTest
193
195
else :
@@ -315,7 +317,7 @@ class MockTestRunner():
315
317
def __init__ (self , abs_filename : str , classname : str , test : str , endpoint : int = None ,
316
318
pics : dict [str , bool ] = None , paa_trust_store_path = None ):
317
319
318
- from chip .testing .matter_testing import MatterTestConfig , MatterStackState
320
+ from chip .testing .matter_testing import MatterStackState , MatterTestConfig
319
321
320
322
self .kvs_storage = 'kvs_admin.json'
321
323
self .config = MatterTestConfig (endpoint = endpoint , paa_trust_store_path = paa_trust_store_path ,
0 commit comments