Repository navigation
Conversation
Contributor
Author
|
Resolved the merge conflict against upstream |
CPBridge
requested changes
Oct 29, 2026
| assert len(sequence.find(item.name)) == 1 | ||
|
|
||
| sr_sequence = ContentSequence([]) | ||
| with pytest.raises(AttributeError): |
Collaborator
There was a problem hiding this comment.
One minor request. Could you please add a match guard here and everywhere else you use pytest.raises so that we are sure we are hitting the intended exception and getting the right message?
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.
ContentSequence queries discard root/non-SR context or call an incompatible template subclass constructor; insert rejects a valid relationship-free non-SR item.
Preserve both context flags in query results, return a base ContentSequence with an accurate annotation, and make insertion respect SR/non-SR relationship requirements before mutating storage or its lookup table.
Related to #479/#480, but #480 is already merged and this patch targets distinct remaining paths. Do not reopen or auto-close those records.
Testing
3 query checks and 6 insertion checks pass using the actual method/guard excerpts with explicit storage and content-item stand-ins. Baseline: 3 query failures; insertion harness separately fails 2 cases and passes 4 on the original context guard.
Not executed: Real highdicom/pydicom constructors, template decoding, the existing 29 ContentSequence tests, SR suite, Flake8 and mypy were not executed.
Compatibility
get_nodes now deliberately returns the documented base sequence rather than an arbitrary template subclass. The patch does not attempt to repair every pre-existing append/setitem validation inconsistency.