From 87704b7b871077c601fd73ba291558beecc7227c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Haitz=20Legarreta=20Gorro=C3=B1o?= Date: Sat, 27 Sep 2025 21:15:51 -0400 Subject: [PATCH] TST: Test the trivial model instantiation through the model factory Test the trivial model instantiation through the model factory. --- test/test_model.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/test_model.py b/test/test_model.py index deea21767..53791baef 100644 --- a/test/test_model.py +++ b/test/test_model.py @@ -304,6 +304,7 @@ def test_model_factory_invalid_model(): @pytest.mark.parametrize( "name, expected_cls", [ + ("trivial", model.TrivialModel), ("avg", model.ExpectationModel), ("average", model.ExpectationModel), ("mean", model.ExpectationModel), @@ -318,6 +319,14 @@ def test_factory_variants(name, expected_cls, setup_random_base_data): motion_affines=motion_affines, datahdr=datahdr, ) + if name == "trivial": + # ToDo + # Does not work because BaseDataset does not have a reference property + # ToDo + # Test the bzero case + # ToDo + # Test the predicted case + setattr(dataset, "reference", np.zeros(dataobj.shape[:3])) model_instance = model.ModelFactory.init(name, dataset=dataset) assert isinstance(model_instance, expected_cls)