Skip to content

test(interpolator): cover empty-instances IndexError guard - #1412

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/interpolator-stale-needs-fix
Jul 22, 2026
Merged

test(interpolator): cover empty-instances IndexError guard#1412
Jammy2211 merged 1 commit into
mainfrom
feature/interpolator-stale-needs-fix

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Closes #1411 (library half).

c8511b553 (2026-04-12) added the empty-instances guard in autofit/interpolator/abstract.py but shipped no test. This adds one.

  • test_no_instancesaf.LinearInterpolator([]) queried at t == 1.5 must raise IndexError matching "no instances".
  • numpy-only, no JAX.

pytest test_autofit/interpolator/ → 36 passed.

The two NEEDS_FIX markers this issue was filed for are stale: autofit_workspace was already un-parked upstream (PR #103), and HowToFit is un-parked in a companion PR.

🤖 Generated with Claude Code

The guard added in c8511b5 shipped without a test. Adds a numpy-only
regression test asserting LinearInterpolator([]) raises a clear IndexError
on a between-samples query rather than an index-out-of-range.

Closes part of #1411

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit 0456178 into main Jul 22, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the feature/interpolator-stale-needs-fix branch July 22, 2026 09:30
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.

fix(interpolator): add missing test for empty-instances guard; clear two stale NEEDS_FIX markers

1 participant