From 63a4e93305fb68875a9efa9495caa98798efeef9 Mon Sep 17 00:00:00 2001 From: Tim Mensinger Date: Wed, 13 Nov 2024 17:45:10 +0100 Subject: [PATCH] Add test case for history plot --- tests/optimagic/visualization/test_history_plots.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/optimagic/visualization/test_history_plots.py b/tests/optimagic/visualization/test_history_plots.py index 32bab8358..62e0b0ef5 100644 --- a/tests/optimagic/visualization/test_history_plots.py +++ b/tests/optimagic/visualization/test_history_plots.py @@ -157,8 +157,10 @@ def test_harmonize_inputs_to_dict_list_results(): def test_harmonize_inputs_to_dict_dict_input(): res = minimize(fun=lambda x: x @ x, params=np.arange(5), algorithm="scipy_lbfgsb") - results = {"bla": res, "blub": res} - assert _harmonize_inputs_to_dict(results=results, names=None) == results + results = {"bla": res, om.algos.scipy_lbfgsb(): res, om.algos.scipy_neldermead: res} + got = _harmonize_inputs_to_dict(results=results, names=None) + expected = {"bla": res, "scipy_lbfgsb": res, "scipy_neldermead": res} + assert got == expected def test_harmonize_inputs_to_dict_dict_input_with_names():