Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extract matter testing utilities to separate module #37309

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
998c3cc
extract utilities to separate module and mark them in original module…
asirko-soft Jan 29, 2025
54bbb3c
update build file to include utilities
asirko-soft Jan 29, 2025
5e486da
Use UserWarning instead of DeprecationWarning; Add type hint decorato…
asirko-soft Jan 29, 2025
ffb910b
lint code
asirko-soft Jan 29, 2025
95ffa2b
Merge branch 'master' into osirko_api_cleanup_extract-utilities
asirko-soft Jan 30, 2025
7b9c6a6
Merge branch 'master' into osirko_api_cleanup_extract-utilities
asirko-soft Jan 30, 2025
bf7f0db
fix incorrect signatures and return values
asirko-soft Jan 30, 2025
5276e70
adding missing alias and docstrings to utility methods
asirko-soft Jan 30, 2025
39cf68e
fix alias issue
asirko-soft Jan 30, 2025
1bd9b00
just update all the places where moved functiones are used
asirko-soft Jan 31, 2025
12e836b
remove commented out code
asirko-soft Jan 31, 2025
5a1a4fe
using direct aliases as requested in review
asirko-soft Feb 3, 2025
a816491
solit utilities to less general modules
asirko-soft Feb 6, 2025
86a464a
isort
asirko-soft Feb 6, 2025
1480b6e
rename types.py to matchers.py
asirko-soft Feb 6, 2025
7505489
rename type_matches to is_type
asirko-soft Feb 6, 2025
e093a0b
added docstrings and copyright to packages
asirko-soft Feb 6, 2025
5fdbc21
style fix
asirko-soft Feb 6, 2025
bbb911a
isort
asirko-soft Feb 6, 2025
6384035
point test_testing imports to original module for now
asirko-soft Feb 7, 2025
025cc48
add doctest for new modules
asirko-soft Feb 7, 2025
d8fb318
Merge branch 'master' into osirko_api_cleanup_extract-utilities
asirko-soft Feb 7, 2025
e258cde
Merge branch 'master' into osirko_api_cleanup_extract-utilities
asirko-soft Feb 7, 2025
b29c46a
this should fix build error, doctests will run when the module is imp…
asirko-soft Feb 7, 2025
c4c38e5
Merge remote-tracking branch 'upstream/master' into osirko_api_cleanu…
asirko-soft Feb 10, 2025
3b9525d
import modules as modules only; add ToDo to remove aliases in future
asirko-soft Feb 12, 2025
957957a
fix imports
asirko-soft Feb 12, 2025
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
Prev Previous commit
Next Next commit
rename types.py to matchers.py
  • Loading branch information
asirko-soft committed Feb 6, 2025
commit 1480b6ea2eb2303f8369e45179f32a6cd5439999
2 changes: 1 addition & 1 deletion src/python_testing/TC_DA_1_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
from chip.testing.basic_composition import BasicCompositionTests
from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main
from chip.testing.conversions import hex_from_bytes
from chip.testing.types import type_matches
from chip.testing.matchers import type_matches
from chip.tlv import TLVReader
from cryptography import x509
from cryptography.exceptions import InvalidSignature
Expand Down
2 changes: 1 addition & 1 deletion src/python_testing/TC_DA_1_5.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
from chip.interaction_model import InteractionModelError, Status
from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main
from chip.testing.conversions import hex_from_bytes
from chip.testing.types import type_matches
from chip.testing.matchers import type_matches
from chip.tlv import TLVReader
from cryptography import x509
from cryptography.hazmat.primitives import hashes
Expand Down
2 changes: 1 addition & 1 deletion src/python_testing/TC_TIMESYNC_2_11.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
from chip.interaction_model import InteractionModelError
from chip.testing.matter_testing import MatterBaseTest, SimpleEventCallback, async_test_body, default_matter_test_main
from chip.testing.timeoperations import get_wait_seconds_from_set_time, utc_time_in_matter_epoch
from chip.testing.types import type_matches
from chip.testing.matchers import type_matches
from chip.tlv import uint
from mobly import asserts

Expand Down
2 changes: 1 addition & 1 deletion src/python_testing/TC_TIMESYNC_2_12.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
from chip.interaction_model import InteractionModelError
from chip.testing.matter_testing import MatterBaseTest, SimpleEventCallback, async_test_body, default_matter_test_main
from chip.testing.timeoperations import get_wait_seconds_from_set_time, utc_time_in_matter_epoch
from chip.testing.types import type_matches
from chip.testing.matchers import type_matches
from chip.tlv import uint
from mobly import asserts

Expand Down
2 changes: 1 addition & 1 deletion src/python_testing/TC_TIMESYNC_2_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
from chip.interaction_model import InteractionModelError, Status
from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main
from chip.testing.timeoperations import utc_time_in_matter_epoch
from chip.testing.types import type_matches
from chip.testing.matchers import type_matches
from mobly import asserts


Expand Down
2 changes: 1 addition & 1 deletion src/python_testing/TC_TIMESYNC_2_7.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
from chip.interaction_model import InteractionModelError
from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main
from chip.testing.timeoperations import compare_time, utc_time_in_matter_epoch
from chip.testing.types import type_matches
from chip.testing.matchers import type_matches
from chip.tlv import uint
from mobly import asserts

Expand Down
2 changes: 1 addition & 1 deletion src/python_testing/TC_TIMESYNC_2_8.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
from chip.interaction_model import InteractionModelError
from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main
from chip.testing.timeoperations import compare_time, utc_time_in_matter_epoch
from chip.testing.types import type_matches
from chip.testing.matchers import type_matches
from chip.tlv import uint
from mobly import asserts

Expand Down
2 changes: 1 addition & 1 deletion src/python_testing/TC_TIMESYNC_2_9.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
from chip.interaction_model import InteractionModelError
from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main
from chip.testing.timeoperations import compare_time, utc_time_in_matter_epoch
from chip.testing.types import type_matches
from chip.testing.matchers import type_matches
from chip.tlv import uint
from mobly import asserts

Expand Down
2 changes: 1 addition & 1 deletion src/python_testing/TestMatterTestingSupport.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
find_tag_list_problems, find_tree_roots, flat_list_ok, get_all_children,
get_direct_children_of_root, parts_list_cycles, separate_endpoint_types)
from chip.testing.timeoperations import compare_time, get_wait_seconds_from_set_time, utc_time_in_matter_epoch
from chip.testing.types import type_matches
from chip.testing.matchers import type_matches
from chip.tlv import uint
from mobly import asserts, signals

Expand Down
2 changes: 1 addition & 1 deletion src/python_testing/matter_testing_infrastructure/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ pw_python_package("chip-testing-module") {
inputs = [ "env_test.yaml" ]

sources = [
"chip.testing/matchers.py",
"chip/testing/__init__.py",
"chip/testing/apps.py",
"chip/testing/basic_composition.py",
Expand All @@ -49,7 +50,6 @@ pw_python_package("chip-testing-module") {
"chip/testing/taglist_and_topology_test.py",
"chip/testing/tasks.py",
"chip/testing/timeoperations.py",
"chip/testing/types.py",
]
tests = [
"chip/testing/test_metadata.py",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
from chip.testing.timeoperations import utc_datetime_from_matter_epoch_us as utc_datetime_from_matter_epoch_us
from chip.testing.timeoperations import utc_datetime_from_posix_time_ms as utc_datetime_from_posix_time_ms
from chip.testing.timeoperations import utc_time_in_matter_epoch as utc_time_in_matter_epoch
from chip.testing.types import type_matches as type_matches
from chip.testing.matchers import type_matches as type_matches
from chip.tlv import uint

# isort: off
Expand Down
Loading