diff --git a/glotaran/examples/parallel_spectral_decay.py b/glotaran/examples/parallel_spectral_decay.py index 5e7e145c5..9e6a17124 100644 --- a/glotaran/examples/parallel_spectral_decay.py +++ b/glotaran/examples/parallel_spectral_decay.py @@ -64,4 +64,4 @@ noise_std_dev=1e-2, ) -SCHEME = Scheme(model=MODEL, parameters=PARAMETER, data={"dataset1": DATASET}) +SCHEME = Scheme(model=MODEL, parameters=PARAMETER, data={"dataset_1": DATASET}) diff --git a/glotaran/examples/sequential_spectral_decay.py b/glotaran/examples/sequential_spectral_decay.py index 1a0fbf27f..7c771eb97 100644 --- a/glotaran/examples/sequential_spectral_decay.py +++ b/glotaran/examples/sequential_spectral_decay.py @@ -64,4 +64,4 @@ noise_std_dev=1e-2, ) -SCHEME = Scheme(model=MODEL, parameters=PARAMETER, data={"dataset1": DATASET}) +SCHEME = Scheme(model=MODEL, parameters=PARAMETER, data={"dataset_1": DATASET}) diff --git a/glotaran/project/test/test_result.py b/glotaran/project/test/test_result.py index b8a1670a2..362836e20 100644 --- a/glotaran/project/test/test_result.py +++ b/glotaran/project/test/test_result.py @@ -4,9 +4,7 @@ from IPython.core.formatters import format_display_data from glotaran.analysis.optimize import optimize -from glotaran.analysis.simulation import simulate -from glotaran.analysis.test.models import ThreeDatasetDecay as suite -from glotaran.project import Scheme +from glotaran.examples.sequential_spectral_decay import SCHEME from glotaran.project.result import IncompleteResultError from glotaran.project.result import Result @@ -14,27 +12,8 @@ @pytest.fixture(scope="session") def dummy_result(): """Dummy result for testing.""" - - wanted_parameters = suite.wanted_parameters - data = {} - for i in range(3): - global_axis = getattr(suite, "global_axis" if i == 0 else f"global_axis{i+1}") - model_axis = getattr(suite, "model_axis" if i == 0 else f"model_axis{i+1}") - - data[f"dataset{i+1}"] = simulate( - suite.sim_model, - f"dataset{i+1}", - wanted_parameters, - {"global": global_axis, "model": model_axis}, - ) - scheme = Scheme( - model=suite.model, - parameters=suite.initial_parameters, - data=data, - maximum_number_function_evaluations=1, - ) - - yield optimize(scheme) + print(SCHEME.data["dataset_1"]) + yield optimize(SCHEME, raise_exception=True) def test_result_ipython_rendering(dummy_result: Result):