Skip to content

test: add the generator for the stripe test fixtures - #120

Merged
petercorke merged 1 commit into
mainfrom
test/stripe-fixture-generator
Oct 3, 2026
Merged

petercorke merged 1 commit into
mainfrom
test/stripe-fixture-generator

Conversation

@petercorke

Copy link
Copy Markdown
Owner

Summary

tests/data/stripes.png and stripes_a.png are committed 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 if lost or changed. Part of the untracked-file cleanup in #45.

Adds tests/data/make_stripes.py, the existing examples/stripe.py moved next to the fixtures it creates, with the path logic adjusted, a main-style entry point and an --outdir option 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

  • PR title follows Conventional Commits
  • CI green

🤖 Generated with Claude Code

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>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

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.

@petercorke
petercorke merged commit d6f712e into main Oct 3, 2026
35 checks passed
@petercorke
petercorke deleted the test/stripe-fixture-generator branch October 3, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant