Skip to content

Commit

Permalink
Fix incorrect module path in method query
Browse files Browse the repository at this point in the history
  • Loading branch information
yousefmoazzam committed Jan 10, 2025
1 parent 97bc317 commit 5252d4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion httomo_backends/methods_database/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions tests/test_method_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand All @@ -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

0 comments on commit 5252d4c

Please sign in to comment.