-
Notifications
You must be signed in to change notification settings - Fork 973
[QDP] test: add & refactor NumPy encoding tests for improved clarity and coverage #824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…verage - Updated test descriptions to better reflect functionality. - Consolidated encoding tests into parameterized cases for basic, large, and single sample inputs. - Introduced helper function to verify tensor properties, enhancing code reuse. - Added tests for different encoding methods and precision settings. - Implemented error handling tests for invalid inputs and unsupported dimensions.
|
cc @ryankert01 , @guan404ming , @400Ping , thx! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors and extends NumPy encoding tests to improve clarity, maintainability, and test coverage. The changes consolidate redundant test code into reusable helper functions and add new test cases for 2D array batch encoding, precision settings, and error handling.
Changes:
- Refactored three similar test functions into a single parameterized test with a helper function
- Added comprehensive test coverage for NumPy array encoding (both 1D and 2D)
- Added tests for encoding configurations (precision settings and encoding methods)
- Added error handling tests for invalid inputs
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ryankert01
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! LG!
Purpose of PR
Test Coverage:
.npyfiles)Related Issues or PRs
closes #823
Changes Made
Breaking Changes
Checklist
Additional
angleandbasisencoding methods (currently onlyamplitudeis implemented)