Skip to content

test: Add unit tests for GPSOdomReader input plugin#1849

Merged
openminddev merged 4 commits intoOpenMind:mainfrom
Wanbogang:add-unit-test-gps-odom-reader
Jan 26, 2026
Merged

test: Add unit tests for GPSOdomReader input plugin#1849
openminddev merged 4 commits intoOpenMind:mainfrom
Wanbogang:add-unit-test-gps-odom-reader

Conversation

@Wanbogang
Copy link
Copy Markdown
Contributor

This PR adds comprehensive unit tests for the GPSOdomReader input plugin located in src/inputs/plugins/gps_odom_reader.py.

The tests cover:

  • Initialization logic, including validation of required configuration parameters (origin_lat, origin_lon, origin_yaw_deg).
  • Core functionality like coordinate conversion (_xy_to_latlon).
  • Angle wrapping utility (_wrap_angle).
  • Pose update mechanism (_update_pose).
  • Polling behavior (_poll).
  • Raw text processing (raw_to_text) and message buffering, including handling of empty/whitespace input.
  • Formatted output generation (formatted_latest_buffer).

All tests are passing.

@Wanbogang Wanbogang requested a review from a team as a code owner January 23, 2026 09:03
@github-actions github-actions Bot added python Python code tests Test files labels Jan 23, 2026
Wanbogang and others added 3 commits January 23, 2026 16:03
Added assertions to ensure that GPS buffer and origin values are not None in test_gps_odom_reader.py. This improves test robustness by verifying required data is present before further checks.
@openminddev openminddev merged commit ea63362 into OpenMind:main Jan 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Python code tests Test files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants