Add parameter setting before tests#881
Merged
1Blademaster merged 3 commits intomainfrom Nov 28, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds parameter initialization setup to test files to ensure consistent test conditions. The changes include creating a new set_params helper function with robust retry logic and adding session-scoped fixtures to multiple test files to configure drone parameters before tests run.
- Introduced
set_paramshelper function with exponential backoff retry logic for setting drone parameters - Added session-scoped setup fixtures to 5 test files (test_rc, test_params, test_gripper, test_frames, test_flightMode) to initialize parameters
- Updated test assertions and parameter values to match the new initialized state
- Simplified the test_flightMode cleanup fixture to use pymavlink directly
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| radio/tests/helpers.py | Added set_params function with retry logic and error handling for setting drone parameters |
| radio/tests/test_rc.py | Added setup fixture to initialize RC parameters and updated test assertions to match new parameter values |
| radio/tests/test_params.py | Added setup fixture to initialize test parameter and changed test parameter name from RC_11MAX to RANDOM_ERR_PARAM |
| radio/tests/test_gripper.py | Added setup fixture to enable gripper parameter before tests |
| radio/tests/test_frames.py | Added setup fixture to initialize frame type and class parameters |
| radio/tests/test_flightMode.py | Added setup fixture for flight mode parameters, removed unused import, and simplified cleanup fixture |
| docs/DEVELOPMENT_GUIDE.md | Added documentation for pytest -x flag to stop on first failure |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.