Skip to content

Fix an unfortunate unit test#246

Merged
mcara merged 1 commit intospacetelescope:mainfrom
mcara:fix-unit-test-permutations
Mar 24, 2026
Merged

Fix an unfortunate unit test#246
mcara merged 1 commit intospacetelescope:mainfrom
mcara:fix-unit-test-permutations

Conversation

@mcara
Copy link
Copy Markdown
Member

@mcara mcara commented Mar 24, 2026

Fixes #245

It looks like one of the tests can create a set of points all along a straight line, resulting in a convex hull with too few points to define a polygon. This PR hardcodes a set of test points that are not collinear.

@mcara mcara added this to the Better Awsomeness milestone Mar 24, 2026
@mcara mcara requested a review from pllim March 24, 2026 01:38
@mcara mcara self-assigned this Mar 24, 2026
@mcara mcara requested a review from a team as a code owner March 24, 2026 01:38
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.48%. Comparing base (4e4daef) to head (eea6a7e).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #246   +/-   ##
=======================================
  Coverage   93.48%   93.48%           
=======================================
  Files          11       11           
  Lines        2011     2011           
=======================================
  Hits         1880     1880           
  Misses        131      131           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@pllim pllim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this makes more sense. Thank you!

@mcara mcara merged commit 8b74ee4 into spacetelescope:main Mar 24, 2026
27 checks passed
@pllim
Copy link
Copy Markdown
Contributor

pllim commented Mar 24, 2026

BTW the offending code was added 7 years ago in #84 . I wonder why it waited 7 years to cause problem.

@mcara
Copy link
Copy Markdown
Member Author

mcara commented Mar 24, 2026

it could be just a change in the random generator or the number of runs for the generator has changed and now that code could be generating a different combination. 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TST: Sometimes test_wcsimcat_wcs_transforms_roundtrip fails with ValueError: Polygon made of too few points

2 participants