Skip to content

Conversation

@Wanbogang
Copy link
Collaborator

Summary

This PR adds comprehensive unit tests for the load_unitree function in src/runtime/robotics.py. This function is responsible for initializing the Unitree robot's network communication channel and is critical for startup in single/multi modes involving Unitree robots.

Details

  • Adds tests for successful initialization scenario.
  • Adds tests for failure scenario (when ChannelFactoryInitialize raises an exception).
  • Adds test for the case when unitree_ethernet is None.
  • Adds tests to verify logging behavior in all scenarios.
  • Uses sys.modules patching to mock external dependencies like unitree.unitree_sdk2py.core.channel.

@Wanbogang Wanbogang requested a review from a team as a code owner February 10, 2026 05:18
@github-actions github-actions bot added python Python code tests Test files labels Feb 10, 2026
@codecov
Copy link

codecov bot commented Feb 10, 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