Skip to content

test: 14 tests for spritegrid/detection.py (find_dominant_spacing, detect_grid)#31

Open
hai-pilgrim wants to merge 1 commit into
marksverdhei:mainfrom
hai-pilgrim:test/detection-coverage
Open

test: 14 tests for spritegrid/detection.py (find_dominant_spacing, detect_grid)#31
hai-pilgrim wants to merge 1 commit into
marksverdhei:mainfrom
hai-pilgrim:test/detection-coverage

Conversation

@hai-pilgrim
Copy link
Copy Markdown

Summary

  • Adds 14 pytest unit tests for src/spritegrid/detection.py
  • Covers find_dominant_spacing: empty/short profile → 0, uniform → 0, regular peaks detected, confidence in [0,1], single peak → 0, integer spacing type
  • Covers detect_grid: return type, uniform → (0,0), too-small image → (0,0), RGB and RGBA input, checkerboard signal, non-negative output invariant

Test plan

  • pytest tests/test_detection_extra.py passes with all 14 tests green
  • Requires scipy, numpy, Pillow (already in project dependencies)

🤖 Contributed by hai-pilgrim

…tect_grid)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

2 participants