-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Rearrange functions in MatterBaseTest #39858
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
base: master
Are you sure you want to change the base?
Rearrange functions in MatterBaseTest #39858
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 refactors the MatterBaseTest
class, improving readability and maintainability by organizing methods and adding docstrings. I've identified and suggested fixes for a few issues, including a potential for incorrect behavior and edge cases in test step handling.
src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py
Outdated
Show resolved
Hide resolved
src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py
Outdated
Show resolved
Hide resolved
src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py
Outdated
Show resolved
Hide resolved
PR #39858: Size comparison from 39de093 to 99b5bd8 Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #39858: Size comparison from ce90b61 to 16eaf47 Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py
Outdated
Show resolved
Hide resolved
This reverts commit 832f7ea.
src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py
Outdated
Show resolved
Hide resolved
src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py
Outdated
Show resolved
Hide resolved
src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py
Outdated
Show resolved
Hide resolved
src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py
Outdated
Show resolved
Hide resolved
src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py
Outdated
Show resolved
Hide resolved
src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py
Outdated
Show resolved
Hide resolved
src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py
Outdated
Show resolved
Hide resolved
src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py
Outdated
Show resolved
Hide resolved
src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py
Outdated
Show resolved
Hide resolved
Co-authored-by: C Freeman <[email protected]>
PR #39858: Size comparison from bcb9403 to 0c8664e Full report (12 builds for cc13x4_26x4, cc32xx, nrfconnect, qpg, stm32, tizen)
|
Updated variable names from app_pipe to pipe_name for consistency across MatterBaseTest and runner.py. Adjusted error handling to reflect the new naming convention, ensuring clarity in logging and exception messages.
PR #39858: Size comparison from bcb9403 to 3cb3e9a Full report (57 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
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.
Would you mind creating a follow up issue to document how to use the record_problem etc. functions? We have this in the SDK docs, but it might make sense to put this right into the file.
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.
Pull Request Overview
This PR reorganizes the functions in the MatterBaseTest
class according to their functionality, improving code structure and maintainability. The reorganization groups related methods into logical sections with improved docstrings for better developer understanding.
- Functions are reorganized into logical sections: Framework Interface, Core Properties, Parameter Getters, Test Definition Helpers, Step Management, Guard/Condition Helpers, Device Interaction, and Utility Helpers
- Enhanced docstrings provide clearer descriptions of method purposes and usage patterns
- No functional changes to existing code logic
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/python_testing/matter_testing_infrastructure/matter/testing/matter_testing.py
Show resolved
Hide resolved
PR #39858: Size comparison from 33f7738 to c5969e8 Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #39858 +/- ##
==========================================
- Coverage 50.72% 50.72% -0.01%
==========================================
Files 1356 1356
Lines 99345 99345
Branches 12876 12876
==========================================
- Hits 50397 50396 -1
- Misses 48948 48949 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 ⛓️ Depends-On RequirementsWonderful, this rule succeeded.Requirement based on the presence of
|
PR #39858: Size comparison from 233d3f7 to bd4f78b Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
PR #39858: Size comparison from f1631b6 to 8f10fc7 Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
Summary
This is just rearrangement of functions from MatterBaseTest according to their functionality. Relevant docstrings were improved as well.
Related issues
Resolves project-chip/matter-test-scripts#597
Depends-On: #39586
Testing
CI and local testing