Skip to content

test(d435_provider): add unit tests for calculate_angle_and_distance#1583

Merged
openminddev merged 3 commits intoOpenMind:mainfrom
Wanbogang:feat-add-d435-provider-test
Jan 19, 2026
Merged

test(d435_provider): add unit tests for calculate_angle_and_distance#1583
openminddev merged 3 commits intoOpenMind:mainfrom
Wanbogang:feat-add-d435-provider-test

Conversation

@Wanbogang
Copy link
Copy Markdown
Contributor

Overview

This PR adds initial unit tests for the D435Provider class in src/providers/d435_provider.py. Specifically, it targets the calculate_angle_and_distance method, which performs mathematical calculations and is well-suited for unit testing.

Type of change

  • Other: Added unit tests

Changes

  • Added tests/providers/test_d435_provider.py.
  • Implemented unit tests for the calculate_angle_and_distance method in D435Provider, covering cases like origin, axes, quadrants, and arbitrary points.

Impact

The primary impact is an improvement in code quality and reliability through increased test coverage for the D435Provider. There are no functional changes to the main application code. The new tests provide confidence that the calculate_angle_and_distance function behaves as expected.

Additional Information

The tests were written to isolate the underlying class behind the @singleton decorator. Local environment setup required installing complex dependencies (zenoh, rust, pycdr2, requests), which CI should manage.

@Wanbogang Wanbogang requested a review from a team as a code owner January 17, 2026 13:24
@github-actions github-actions Bot added python Python code tests Test files labels Jan 17, 2026
openminddev and others added 2 commits January 18, 2026 17:22
Removed unnecessary file header and redundant comments from the test fixture in test_d435_provider.py. Minor type hint added for clarity.
@openminddev openminddev merged commit e628a47 into OpenMind:main Jan 19, 2026
1 check 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