-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Remove temporary aliases from matter testing.py #40004
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
Remove temporary aliases from matter testing.py #40004
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request is a large-scale refactoring to improve code clarity by removing temporary aliases and using fully qualified names instead. The changes are extensive and mostly correct. However, I've identified a few critical issues, including typos and an incorrect function call that was likely introduced during the refactoring. Additionally, the core goal of removing the temporary aliases from matter_testing.py
has not been fully completed, as the alias definitions still remain. Please address these points to ensure the stability and completeness of the refactoring.
@@ -182,7 +182,7 @@ async def test_TC_TIMESYNC_2_8(self): | |||
self.print_step(22, "Read LocalTime") | |||
if dst_list_size > 1: | |||
local = await self.read_ts_attribute_expect_success(local_attr) | |||
compare_time(received=local, offset=timedelta(seconds=7200), tolerance=timedelta(seconds=5)) | |||
timeoperations.ompare_time(received=local, offset=timedelta(seconds=7200), tolerance=timedelta(seconds=5)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a typo in the function name. It should be compare_time
instead of ompare_time
.
timeoperations.ompare_time(received=local, offset=timedelta(seconds=7200), tolerance=timedelta(seconds=5)) | |
timeoperations.compare_time(received=local, offset=timedelta(seconds=7200), tolerance=timedelta(seconds=5)) |
src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py
Outdated
Show resolved
Hide resolved
3d27b4c
to
05114c1
Compare
Remove submodules from git history please. |
Remove submodules from git history please. |
aace022
to
c10a82e
Compare
Summary
Refactored matter_testing.py to remove all temporary function aliases from the matchers, timeoperations, conversions, and decorators modules. Replaced all alias usages with fully qualified module paths (e.g., matchers.assert_success instead of assert_success). This change ensures better code readability, avoids ambiguity, and aligns with the module-level organization standards defined for the project.
Related issues
Fixes: #37537
Testing
Refactored Python tests