Repository navigation
Conversation
CPBridge
requested changes
Oct 24, 2026
CPBridge
left a comment
Collaborator
There was a problem hiding this comment.
Thanks, one comment about the tests
| assert lut.LUTExplanation == self._explanation | ||
|
|
||
|
|
||
| class TestLUTDecoding: |
Collaborator
There was a problem hiding this comment.
I am gradually trying to move away from grouping tests into classes like this (a vestige of using unittest instead of pytest)
Therefore, could we please get rid of this class and have the tests at the scope of the module
Contributor
Author
There was a problem hiding this comment.
Thanks—updated in c9fc19c. I removed TestLUTDecoding and moved its four parametrized methods to module-level pytest functions, preserving the assertions. The full suite passed locally: 2,082 passed and 153 skipped (optional dependencies).
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.
Problem
A LUT constructed with 65,536 entries currently rejects its own data because its encoded count is zero. Separately, the default copying constructor aliases and changes the caller's Dataset.
Change
Use the existing number_of_entries property for the decoded expected length, and delete the assignment that overwrites the selected deepcopy.
Seventeen synthetic cases cover uint8 and uint16 LUTs of lengths 1, 3, 256, 65,535 and 65,536; exact getter values and dtypes; endpoint application; from_dataset decoding of both maximum-length forms; truncated payload rejection; and omitted/True/False copy behavior with mutable descriptor and data isolation.
Validation
python -m pytest -q tests/test_content.py: 116 passed.ab8843cb49545b88a1b0c811310222dbcbdce6d4.Validation used Python 3.12.14 and NumPy 2.3.5 with current upstream source. The full pytest --flake8 suite has not been run in this constrained environment.