Skip to content

Commit

Permalink
adding test for _get_solver
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Lee committed Oct 5, 2023
1 parent e7e7cb3 commit 2ab93a2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions idaes/core/util/tests/test_model_diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1741,6 +1741,14 @@ def test_init(self, model):
assert dh.degenerate_set == {}
assert dh.irreducible_degenerate_sets == []

@pytest.mark.unit
def test_get_solver(self, model):
dh = DegeneracyHunter2(model, solver="ipopt", solver_options={"maxiter": 50})

solver = dh._get_solver()

assert solver.options == {"maxiter": 50}

@pytest.mark.unit
def test_prepare_candidates_milp(self, model):
dh = DegeneracyHunter2(model)
Expand Down

0 comments on commit 2ab93a2

Please sign in to comment.