Skip to content

Type UAV test fakes#245

Closed
ethayu wants to merge 1 commit into
user/ethayu/workspace-pylance-uav-test-stubsfrom
user/ethayu/workspace-pylance-uav-test-fakes
Closed

Type UAV test fakes#245
ethayu wants to merge 1 commit into
user/ethayu/workspace-pylance-uav-test-stubsfrom
user/ethayu/workspace-pylance-uav-test-fakes

Conversation

@ethayu

@ethayu ethayu commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Fixes #244.
Part of #201.
Stacked on #243.

Summary

  • Cast ModeManager test doubles to explicit dynamic objects where tests bypass ROS constructors.
  • Preserve fake mode constructor annotations while casting the base Mode initialization calls.
  • Type the remaining dynamic mission and vision fakes used by runtime tests.

Verification

  • python3 -m py_compile controls/sae_2025_ws/src/uav/test/test_auto_launch.py controls/sae_2025_ws/src/uav/test/test_runtime_behavior.py controls/sae_2025_ws/src/uav/test/test_schema_validation.py
  • npx --yes pyright controls/sae_2025_ws/src/uav/test/test_auto_launch.py controls/sae_2025_ws/src/uav/test/test_runtime_behavior.py controls/sae_2025_ws/src/uav/test/test_schema_validation.py --outputjson => 0 errors
  • ruff format controls/sae_2025_ws/src/uav/test/test_auto_launch.py controls/sae_2025_ws/src/uav/test/test_runtime_behavior.py controls/sae_2025_ws/src/uav/test/test_schema_validation.py
  • ruff check controls/sae_2025_ws/src/uav/test/test_auto_launch.py controls/sae_2025_ws/src/uav/test/test_runtime_behavior.py controls/sae_2025_ws/src/uav/test/test_schema_validation.py
  • python3 -m pytest -q controls/sae_2025_ws/src/uav/test/test_auto_launch.py controls/sae_2025_ws/src/uav/test/test_runtime_behavior.py controls/sae_2025_ws/src/uav/test/test_schema_validation.py::test_fleet_vehicle_transition_labels_are_case_sensitive => 37 passed

Full touched-file pytest including all of test_schema_validation.py still fails on the pre-existing missing checked-in mission fixture payload_full_run.yaml.

@ethayu

ethayu commented May 27, 2026

Copy link
Copy Markdown
Collaborator Author

Condensed into #243 so the UAV test-stub and fake-manager typing changes review together. #243 now fixes #242, #244, and #250.

@ethayu ethayu closed this May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant