test(d435_provider): add unit tests for calculate_angle_and_distance#1583
Merged
openminddev merged 3 commits intoOpenMind:mainfrom Jan 19, 2026
Merged
Conversation
Removed unnecessary file header and redundant comments from the test fixture in test_d435_provider.py. Minor type hint added for clarity.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds initial unit tests for the
D435Providerclass insrc/providers/d435_provider.py. Specifically, it targets thecalculate_angle_and_distancemethod, which performs mathematical calculations and is well-suited for unit testing.Type of change
Changes
tests/providers/test_d435_provider.py.calculate_angle_and_distancemethod inD435Provider, 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 thecalculate_angle_and_distancefunction behaves as expected.Additional Information
The tests were written to isolate the underlying class behind the
@singletondecorator. Local environment setup required installing complex dependencies (zenoh,rust,pycdr2,requests), which CI should manage.