diff --git a/benchmark/pytest/analysis/test_problem.py b/benchmark/pytest/analysis/test_problem.py index 9c148818f..16aa886c3 100644 --- a/benchmark/pytest/analysis/test_problem.py +++ b/benchmark/pytest/analysis/test_problem.py @@ -13,6 +13,7 @@ from glotaran.model import megacomplex from glotaran.parameter import ParameterGroup from glotaran.project import Scheme +from glotaran.testing.plugin_system import monkeypatch_plugin_registry if TYPE_CHECKING: from glotaran.model import DatasetModel @@ -53,6 +54,7 @@ def finalize_data( pass +@monkeypatch_plugin_registry(test_megacomplex={"benchmark": BenchmarkMegacomplex}) def setup_model(index_dependent): model_dict = { "megacomplex": {"m1": {"is_index_dependent": index_dependent}}, diff --git a/glotaran/model/model.py b/glotaran/model/model.py index d69c20759..8d56c509c 100644 --- a/glotaran/model/model.py +++ b/glotaran/model/model.py @@ -85,7 +85,7 @@ def from_dict( } if default_megacomplex_type is not None: megacomplex_types[default_megacomplex_type] = get_megacomplex(default_megacomplex_type) - del model_dict["default-megacomplex"] + model_dict.pop("default-megacomplex", None) model = cls( megacomplex_types=megacomplex_types, default_megacomplex_type=default_megacomplex_type