Skip to content

Refactor regularization tests for granularity and clarity#233

Merged
Jammy2211 merged 1 commit intomainfrom
feature/refactor-regularizations-tests
Mar 10, 2026
Merged

Refactor regularization tests for granularity and clarity#233
Jammy2211 merged 1 commit intomainfrom
feature/refactor-regularizations-tests

Conversation

@Jammy2211
Copy link
Owner

Summary

  • Split 6 monolithic regularization test functions into 33 focused single-assertion tests
  • Descriptive test names encode the condition and expected result (e.g. test__weighted_regularization_matrix_from__uniform_weights__equals_unweighted)
  • Added @pytest.mark.parametrize across weighted and adapt matrix scenarios to eliminate duplicated setup blocks

Test plan

  • All 33 regularization tests pass (python -m pytest test_autoarray/inversion/regularizations/ -q)
  • No numerical assertion values were changed

🤖 Generated with Claude Code

Split monolithic tests into focused single-assertion tests with
descriptive names encoding condition and expected result. Add
@pytest.mark.parametrize for weighted/adapt matrix scenarios.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Jammy2211 Jammy2211 merged commit 2119ccc into main Mar 10, 2026
8 checks passed
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