test: add the generator for the stripe test fixtures - #120
Merged
Merged
Conversation
stripes.png and stripes_a.png are committed in tests/data/ and used by tests/base/test_io.py and tests/test_image_io.py, but the script that creates them was never committed, so they could not be regenerated. Adds tests/data/make_stripes.py (with an --outdir option). Regenerated output is pixel-identical to the committed fixtures on OpenCV 4.14 and 5.0. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
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.
Summary
tests/data/stripes.pngandstripes_a.pngare committed and used bytests/base/test_io.pyandtests/test_image_io.py, but the script that creates them was never committed, so they could not be regenerated if lost or changed. Part of the untracked-file cleanup in #45.Adds
tests/data/make_stripes.py, the existingexamples/stripe.pymoved next to the fixtures it creates, with the path logic adjusted, amain-style entry point and an--outdiroption so it can be run without overwriting the committed images.Verification
Regenerated into a scratch directory on OpenCV 4.14.0 and 5.0.0 (clean venvs): both images are pixel-identical to the committed fixtures (compared decoded, not byte-for-byte, since PNG encoding can vary with the zlib build). No library code or tests changed.
Checklist
🤖 Generated with Claude Code