Skip to content

Commit 090dfd7

Browse files
committed
TST: Test the trivial model instantiation through the model factory
Test the trivial model instantiation through the model factory.
1 parent a2bae01 commit 090dfd7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/test_model.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ def test_model_factory_invalid_model():
228228
@pytest.mark.parametrize(
229229
"name, expected_cls",
230230
[
231+
("trivial", model.TrivialModel),
231232
("avg", model.ExpectationModel),
232233
("average", model.ExpectationModel),
233234
("mean", model.ExpectationModel),
@@ -242,6 +243,14 @@ def test_factory_variants(name, expected_cls, setup_random_base_data):
242243
motion_affines=motion_affines,
243244
datahdr=datahdr,
244245
)
246+
if name == "trivial":
247+
# ToDo
248+
# Does not work because BaseDataset does not have a reference property
249+
# ToDo
250+
# Test the bzero case
251+
# ToDo
252+
# Test the predicted case
253+
setattr(dataset, "reference", np.zeros(dataobj.shape[:3]))
245254
model_instance = model.ModelFactory.init(name, dataset=dataset)
246255
assert isinstance(model_instance, expected_cls)
247256

0 commit comments

Comments
 (0)