From c35b702f251238e7766c1962e48fee3a52a97dd8 Mon Sep 17 00:00:00 2001 From: mzouink Date: Wed, 13 Nov 2024 11:38:24 -0500 Subject: [PATCH] add stored architecture test --- tests/operations/test_architecture.py | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/tests/operations/test_architecture.py b/tests/operations/test_architecture.py index 5ba387b4..f1f20071 100644 --- a/tests/operations/test_architecture.py +++ b/tests/operations/test_architecture.py @@ -18,9 +18,29 @@ def test_architecture( architecture_config, ): + architecture = architecture_config.architecture_type(architecture_config) + assert architecture.dims is not None, f"Architecture dims are None {architecture}" + + + + +@pytest.mark.parametrize( + "architecture_config", + [ + lf("dummy_architecture"), + lf("unet_architecture"), + ], +) +def test_stored_architecture( + architecture_config, +): + from dacapo.store.create_store import create_config_store + config_store = create_config_store() + config_store.store_architecture_config(architecture_config) + + retrieved_arch_config = config_store.retrieve_architecture_config(architecture_config.name) - architecture_type = architecture_config.architecture_type - architecture = architecture_type(architecture_config) + architecture = retrieved_arch_config.architecture_type(retrieved_arch_config) assert architecture.dims is not None, f"Architecture dims are None {architecture}"