Skip to content

Commit

Permalink
fix 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Czaki committed Sep 3, 2024
1 parent 98377e9 commit 38d94bf
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions package/tests/test_PartSeg/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ def _prepare_layers(self, image, parameters, replace):
self._add_image(napari_image_view._prepare_layers(image, parameters, replace))

monkeypatch.setattr(napari_image_view.ImageView, "_prepare_layers", _prepare_layers)
monkeypatch.setattr("napari._qt.threads.status_checker.StatusChecker.start", lambda x: None, raising=False)


@pytest.fixture(autouse=True)
Expand All @@ -63,12 +62,7 @@ def _add_layer_util(self, index, layer, filters):
if layer not in self.viewer.layers:
self.viewer.add_layer(layer)

with contextlib.suppress(ImportError):
monkeypatch.setattr(
napari_image_view.ImageView,
"_add_layer_util",
_add_layer_util,
)
monkeypatch.setattr(napari_image_view.ImageView, "_add_layer_util", _add_layer_util)


@pytest.fixture(autouse=True)
Expand Down Expand Up @@ -179,3 +173,9 @@ def _mock_throttler(monkeypatch):

if hasattr(qt_main_window, "QSignalThrottler"):
monkeypatch.setattr(qt_main_window, "QSignalThrottler", DummyThrottler)
with contextlib.suppress(ImportError):
monkeypatch.setattr(
"napari._qt.threads.status_checker.StatusChecker.start",
lambda x: None,
raising=False,
)

0 comments on commit 38d94bf

Please sign in to comment.