diff --git a/idaes/core/util/parameter_sweep.py b/idaes/core/util/parameter_sweep.py index 56e2303404..0aa06ddfba 100644 --- a/idaes/core/util/parameter_sweep.py +++ b/idaes/core/util/parameter_sweep.py @@ -697,8 +697,8 @@ def handle_error(self, model): Output of handle_solver_error callback """ if self.config.handle_solver_error is None: - # No recourse specified, so success=False and results=None - return None, False + # No recourse specified, so results=None + return None else: args = self.config.handle_solver_error_arguments if args is None: diff --git a/idaes/core/util/tests/test_parameter_sweep.py b/idaes/core/util/tests/test_parameter_sweep.py index 329b7c40f2..a851903e94 100644 --- a/idaes/core/util/tests/test_parameter_sweep.py +++ b/idaes/core/util/tests/test_parameter_sweep.py @@ -957,7 +957,7 @@ def test_handle_error_none(self): results = psweep.handle_error(model) - assert results == (None, False) + assert results == None @pytest.mark.unit def test_handle_error(self): @@ -1121,7 +1121,7 @@ def solve(model, *args, **kwargs): raise Exception("Test exception") def recourse(model): - return "foo", "bar" + return "foo" spec2 = ParameterSweepSpecification() spec2.set_sampling_method(UniformSampling) @@ -1138,7 +1138,7 @@ def recourse(model): results, success, error = psweep.execute_single_sample(1) assert results == "foo" - assert success == "bar" + assert not success assert error == "Test exception" @pytest.fixture(scope="class")