Skip to content

Commit 2af8eb0

Browse files
committed
Missed deleting some parameters in tests
1 parent eb52f46 commit 2af8eb0

1 file changed

Lines changed: 6 additions & 14 deletions

File tree

tests/workflows/clem/test_align_and_merge.py

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from pathlib import Path
2-
from typing import Literal
3-
from unittest.mock import MagicMock, patch
2+
from unittest.mock import MagicMock
43

54
import pytest
5+
from pytest_mock import MockerFixture
66

77
from murfey.server.ispyb import TransportManager
88
from murfey.util.config import MachineConfig
@@ -23,12 +23,6 @@
2323
]
2424
feedback_queue = "murfey_feedback"
2525

26-
# Align and merge settings
27-
crop_to_n_frames = 20
28-
align_self: Literal["enabled", ""] = "enabled"
29-
flatten: Literal["mean", "min", "max", ""] = "max"
30-
align_across: Literal["enabled", ""] = "enabled"
31-
3226

3327
@pytest.fixture
3428
def processed_dir(tmp_path: Path):
@@ -62,9 +56,8 @@ def metadata(processed_dir: Path):
6256
return metadata
6357

6458

65-
@patch("murfey.workflows.clem.align_and_merge.get_machine_config")
6659
def test_run(
67-
mock_get_machine_config,
60+
mocker: MockerFixture,
6861
image_stacks: list[Path],
6962
metadata: Path,
7063
processed_dir: Path,
@@ -81,6 +74,9 @@ def test_run(
8174
# Construct a mock MachineConfig object for use within the function
8275
mock_machine_config = MagicMock(spec=MachineConfig)
8376
mock_machine_config.processed_directory_name = processed_folder
77+
mock_get_machine_config = mocker.patch(
78+
"murfey.workflows.clem.align_and_merge.get_machine_config"
79+
)
8480
mock_get_machine_config.return_value = {
8581
instrument_name: mock_machine_config,
8682
}
@@ -92,10 +88,6 @@ def test_run(
9288
series_name=series_name_long,
9389
images=image_stacks,
9490
metadata=metadata,
95-
crop_to_n_frames=crop_to_n_frames,
96-
align_self=align_self,
97-
flatten=flatten,
98-
align_across=align_across,
9991
messenger=mock_transport,
10092
)
10193

0 commit comments

Comments
 (0)