Skip to content

Parametrize the inherited TestStackLikeFunctions in the vector tests#185

Merged
roytsmart merged 2 commits into
mainfrom
fix/stack-test-array-2
Jul 12, 2026
Merged

Parametrize the inherited TestStackLikeFunctions in the vector tests#185
roytsmart merged 2 commits into
mainfrom
fix/stack-test-array-2

Conversation

@roytsmart

Copy link
Copy Markdown
Collaborator

named-arrays now exercises np.stack against a second operand in the generic TestStackLikeFunctions (sun-data/named-arrays#191, released in the latest named-arrays version), which requires each family test module to parametrize array_2. Without this, the optika vector/ray test classes that inherit the named-arrays abstract test chains error with "fixture 'array_2' not found" (16 errors against the new release).

This mirrors the existing TestAsArrayLikeFunctions pattern in the six affected modules (test_vectors_field/object/polarization/pupil/scene, test_ray_vectors), reusing each module's existing instance lists. 28 new stack cases pass; black and ruff clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Lm9SxSpyNg9hx8dNL9pUXc

roytsmart and others added 2 commits July 12, 2026 11:02
named-arrays now exercises np.stack against a second array in
TestStackLikeFunctions (sun-data/named-arrays#191), which requires each
family test module to parametrize array_2. Mirror the existing
TestAsArrayLikeFunctions pattern in the optika vector and ray test
modules.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lm9SxSpyNg9hx8dNL9pUXc
@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.37%. Comparing base (a727eb0) to head (8cb156f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #185   +/-   ##
=======================================
  Coverage   99.37%   99.37%           
=======================================
  Files         116      116           
  Lines        6257     6275   +18     
=======================================
+ Hits         6218     6236   +18     
  Misses         39       39           
Flag Coverage Δ
unittests 99.37% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

@roytsmart
roytsmart merged commit f6d139b into main Jul 12, 2026
12 checks passed
@roytsmart
roytsmart deleted the fix/stack-test-array-2 branch July 12, 2026 17:34
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