Skip to content

Test that incompatible solver types raise InvalidFunctionError - #720

Open
janosg wants to merge 1 commit into
mainfrom
test/solver-type-mismatch
Open

janosg wants to merge 1 commit into
mainfrom
test/solver-type-mismatch

Conversation

@janosg

@janosg janosg commented Oct 19, 2026

Copy link
Copy Markdown
Member

The checks in create_optimization_problem.py that reject likelihood solvers for scalar problems and least-squares solvers for non-least-squares problems had no tests. This adds three tests to test_function_formats_scalar.py:

  • scalar problem with a likelihood solver (bhhh)
  • scalar problem with a least-squares solver (scipy_ls_trf)
  • likelihood problem with a least-squares solver (scipy_ls_trf)

Split out from #716.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
janosg added a commit that referenced this pull request Oct 19, 2026
Drop the tests for maximizing least-squares problems (already covered in
test_function_formats_ls.py) and for incompatible solver types (moved to #720).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@janosg
janosg requested a review from timmens October 19, 2026 18:01
@codecov

codecov Bot commented Oct 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
see 3 files with indirect coverage changes

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

This branch has not been deployed

No deployments
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