Skip to content

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

Conversation

abalestra22
Copy link
Contributor

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

./scripts/tests/local.py build         # will compile python in out/pyenv and ALL application prerequisites
./scripts/tests/local.py python-tests  # Runs all python tests that are runnable in CI

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

There is a typo in the function name. It should be compare_time instead of ompare_time.

Suggested change
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))

@abalestra22 abalestra22 force-pushed the remove_temporary_aliase_from_matter_testing.py branch from 3d27b4c to 05114c1 Compare July 14, 2025 20:02
@abalestra22 abalestra22 requested a review from a team as a code owner July 14, 2025 20:02
@github-actions github-actions bot added the tests label Jul 14, 2025
@abalestra22
Copy link
Contributor Author

Remove submodules from git history please.

@abalestra22 abalestra22 reopened this Jul 14, 2025
@abalestra22
Copy link
Contributor Author

Remove submodules from git history please.

@mergify mergify bot removed the conflict label Jul 14, 2025
@abalestra22 abalestra22 reopened this Jul 14, 2025
@mergify mergify bot added the conflict label Jul 14, 2025
@abalestra22 abalestra22 force-pushed the remove_temporary_aliase_from_matter_testing.py branch from aace022 to c10a82e Compare July 15, 2025 17:34
@mergify mergify bot removed the conflict label Jul 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant