test: update unit testrings for dataclass module#238
Merged
Conversation
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves testing coverage and code quality across dataclass modules. The main focus is introducing a new test for the SemanticLabel class while also addressing type consistency and PEP8 compliance issues.
Key changes:
- Added comprehensive unit tests for
SemanticLabelclass equality and comparison operations - Improved type consistency by switching from external
pyquaternion.Quaternionto internalt4_devkit.typing.Quaternion - Fixed import ordering and type definition inconsistencies
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/dataclass/test_label.py | New test file verifying SemanticLabel initialization, properties, and equality comparisons |
| tests/dataclass/test_trajectory.py | Updated import to use internal Quaternion type for consistency |
| t4_devkit/dataclass/pointcloud.py | Fixed PEP8 import ordering and converted range to explicit list type |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
1 similar comment
Contributor
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
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.
What
This pull request introduces several improvements and fixes across the codebase, including a new test for the
SemanticLabelclass, type consistency updates, and minor code cleanups. The most important changes are summarized below:Testing Enhancements:
test_label.pyto verify the behavior and equality logic of theSemanticLabelclass, including attribute checks and comparison operations.Type Consistency and Imports:
test_trajectory.pyto use the internalQuaterniontype fromt4_devkit.typinginstead of the externalpyquaternionlibrary, improving consistency and reducing external dependencies.Code Quality and Minor Fixes:
load_jsoninpointcloud.pyto follow PEP8 import order, placing third-party and internal imports after standard library imports.dynprop_statesclass variable inRadarPointCloudto explicitly convert the range to a list, ensuring consistent type usage.