From a0feae4528e708d0a099677fbb7960adf1c6d6be Mon Sep 17 00:00:00 2001 From: Yousef Moazzam Date: Fri, 10 Jan 2025 15:41:31 +0000 Subject: [PATCH] Fix incorrect module path in method query --- httomo_backends/methods_database/query.py | 2 +- tests/test_method_query.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/httomo_backends/methods_database/query.py b/httomo_backends/methods_database/query.py index cf82b51..2b45e07 100644 --- a/httomo_backends/methods_database/query.py +++ b/httomo_backends/methods_database/query.py @@ -157,7 +157,7 @@ def calculate_padding(self, **kwargs) -> Tuple[int, int]: def _import_supporting_funcs_module(self) -> ModuleType: - module_mem_path = "httomo_backends.methods_database.backends." + module_mem_path = "httomo_backends.methods_database.packages.backends." path = self.module_path.split(".") path.insert(1, "supporting_funcs") module_mem_path += ".".join(path) diff --git a/tests/test_method_query.py b/tests/test_method_query.py index 40a8930..d313f8e 100644 --- a/tests/test_method_query.py +++ b/tests/test_method_query.py @@ -116,7 +116,7 @@ def _calc_memory_bytes_testmethod(non_slice_dims_shape, dtype, testparam): mem = query.calculate_memory_bytes((42, 3), np.float32, testparam=42.0) importmock.assert_called_with( - "httomo_backends.methods_database.backends.sample.supporting_funcs.module.path" + "httomo_backends.methods_database.packages.backends.sample.supporting_funcs.module.path" ) assert mem == (10, 20) @@ -139,7 +139,7 @@ def _calc_output_dim_testmethod(non_slice_dims_shape, testparam): dims = query.calculate_output_dims((42, 3), testparam=42.0) importmock.assert_called_with( - "httomo_backends.methods_database.backends.sample.supporting_funcs.module.path" + "httomo_backends.methods_database.packages.backends.sample.supporting_funcs.module.path" ) assert dims == (10, 20) @@ -161,7 +161,7 @@ def _calc_padding_testmethod(size): pads = query.calculate_padding(size=SIZE_PARAMETER) importmock.assert_called_once_with( - "httomo_backends.methods_database.backends.sample.supporting_funcs.module.path" + "httomo_backends.methods_database.packages.backends.sample.supporting_funcs.module.path" ) assert pads == PADDING_RETURNED