Skip to content

Conversation

@Wanbogang
Copy link
Collaborator

Summary

This PR adds comprehensive unit tests for the src/hooks/nav2_hook.py module to improve code coverage and ensure the stability of the start_nav2_hook and stop_nav2_hook functions.

Changes

  • Added tests/test_hooks_nav2_hook.py with tests for:
    • start_nav2_hook function (success, HTTP error, client error)
    • stop_nav2_hook function (success, HTTP error, client error)
  • Properly mocks the aiohttp.ClientSession and related components for testing
  • Includes helper functions to reduce code duplication in tests
  • Uses pytest and unittest.mock for asynchronous mocking

@Wanbogang Wanbogang requested a review from a team as a code owner January 29, 2026 11:14
@github-actions github-actions bot added python Python code tests Test files labels Jan 29, 2026
@codecov
Copy link

codecov bot commented Jan 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

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.

1 participant