Skip to content

Separate plane and copter tests based on sitl type#913

Merged
1Blademaster merged 4 commits intomainfrom
912-separate-plane-and-copter-tests
Dec 14, 2025
Merged

Separate plane and copter tests based on sitl type#913
1Blademaster merged 4 commits intomainfrom
912-separate-plane-and-copter-tests

Conversation

@1Blademaster
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings December 13, 2025 13:38
@1Blademaster 1Blademaster linked an issue Dec 13, 2025 that may be closed by this pull request
Comment thread .github/workflows/python_tests_plane.yml Fixed
Comment thread .github/workflows/python_tests_copter.yml Fixed
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 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_only and @pytest.mark.copter_only) to tag aircraft-specific tests
  • Removed the SetAircraftType test 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.

Comment thread .github/workflows/python_tests_copter.yml
@1Blademaster 1Blademaster requested a review from a team December 13, 2025 13:51
Copy link
Copy Markdown
Contributor

@Kwash67 Kwash67 left a comment

Choose a reason for hiding this comment

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

All good

@1Blademaster 1Blademaster merged commit 1990c4c into main Dec 14, 2025
7 of 8 checks passed
@1Blademaster 1Blademaster deleted the 912-separate-plane-and-copter-tests branch December 14, 2025 18:17
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.

Separate plane and copter tests

4 participants