Skip to content

Commit

Permalink
add unknown solver and method test.
Browse files Browse the repository at this point in the history
  • Loading branch information
AtsushiSakai committed Nov 20, 2020
1 parent 4f5c8ee commit a12ebcb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scipy/optimize/tests/test_optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -2199,4 +2199,12 @@ def test_show_options():
for method in methods:
# testing that `show_options` works without error
show_options(solver, method)


unknown_solver_method = {
'minimize': "ekki", # unknown method
'maximize': "cg", # unknown solver
'maximize': "ekki", # unknown solver and method
}
for solver, method in unknown_solver_method.items():
# testing that `show_options` raises ValueError
assert_raises(ValueError, show_options, solver, method)

0 comments on commit a12ebcb

Please sign in to comment.