Separate plane and copter tests based on sitl type#913
Merged
1Blademaster merged 4 commits intomainfrom Dec 14, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the test suite to properly separate plane and copter tests based on the actual SITL (Software In The Loop) simulator type, rather than mocking the aircraft type within tests.
Key Changes:
- Introduced pytest markers (
@pytest.mark.plane_onlyand@pytest.mark.copter_only) to tag aircraft-specific tests - Removed the
SetAircraftTypetest helper that artificially changed aircraft types - Split combined tests into separate plane and copter variants with appropriate test data
- Created separate CI workflows for plane and copter SITL environments
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
radio/tests/test_FlightModesController.py |
Split test_setFlightMode into four separate tests (invalid data and success cases for both plane and copter), removed SetAircraftType import, and added pytest markers for aircraft-specific tests |
radio/tests/helpers.py |
Removed the SetAircraftType context manager class that was used to mock aircraft types |
radio/tests/conftest.py |
Added pytest_configure to register custom markers and implemented check_aircraft_type fixture to automatically skip tests based on aircraft type markers |
.github/workflows/python_tests_plane.yml |
Created new workflow to run tests with ArduPlane SITL, excluding copter-only tests |
.github/workflows/python_tests_copter.yml |
Updated workflow name and configuration to explicitly use ArduCopter SITL and exclude plane-only tests |
💡 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.