From 2ab93a2aebfd5d126274f0e93ebf85d99bbf82b0 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Thu, 5 Oct 2023 16:04:48 -0400 Subject: [PATCH] adding test for _get_solver --- idaes/core/util/tests/test_model_diagnostics.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/idaes/core/util/tests/test_model_diagnostics.py b/idaes/core/util/tests/test_model_diagnostics.py index c49510bd50..a742014ac2 100644 --- a/idaes/core/util/tests/test_model_diagnostics.py +++ b/idaes/core/util/tests/test_model_diagnostics.py @@ -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)