Repository navigation
chore(tests): move gzip mtime-comparison helper out of library code - #4326
Merged
Merged
Conversation
`_gzip_streams_equal_except_mtime` was only used by tests but lived in `zarr.codecs.gzip`. Move it to `tests/conftest.py` alongside the other shared test helpers (`nan_equal`, `deep_nan_equal`), rename it to `gzip_streams_equal_except_mtime`, and update both importers. Assisted-by: ClaudeCode:claude-fable-5-1
Assisted-by: ClaudeCode:claude-fable-5-1
d-v-b
marked this pull request as ready for review
September 9, 2026 12:12
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.
This PR moves a used-by-tests-only helper for GZIP streams into the tests directory. I think it's a self-merge kind of PR.
🤖 AI text below 🤖
Summary
_gzip_streams_equal_except_mtimewas added tozarr.codecs.gzipby #4270 / #4296 as a comparator for gzip output whose 4-byte MTIME header field varies with encode time, but its only callers aretests/test_fused_pipeline.pyandtests/test_codecs/test_gzip.py. This PR moves it intotests/conftest.pyalongside the other shared test helpers (nan_equal,deep_nan_equal,Expect), renames itgzip_streams_equal_except_mtimeto match its new neighbors, and updates both importers. The library module no longer carries a test-only function; the function's body and its RFC 1952 docstring are unchanged.Found during the pre-release review for #4256.
For reviewers
The move is mechanical. The only judgement calls are the home (
tests/conftest.py, which already exports helpers imported asfrom tests.conftest import ..., rather than the publicsrc/zarr/testing/package) and the dropped leading underscore.Author attestation
TODO
docs/user-guide/*.md(n/a)changes/