From 887a980b0cea679c69a6f33f2c92b6d7b6e3bc57 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Thu, 26 Oct 2023 06:00:34 -0700 Subject: [PATCH] fix: don't use global instance in layer_scale test (#298) * fix: don't use global instance in layer_scale test * use fixture instead * style: [pre-commit.ci] auto fixes [...] --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- tests/test_layer_scale.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_layer_scale.py b/tests/test_layer_scale.py index 07911c3e..5c7d9eb6 100644 --- a/tests/test_layer_scale.py +++ b/tests/test_layer_scale.py @@ -5,10 +5,10 @@ import pytest from napari_micromanager._mda_handler import _NapariMDAHandler from napari_micromanager._mda_meta import SEQUENCE_META_KEY, SequenceMeta -from pymmcore_plus import CMMCorePlus if TYPE_CHECKING: from napari_micromanager.main_window import MainWindow + from pymmcore_plus import CMMCorePlus from useq import MDASequence @@ -17,10 +17,10 @@ def test_layer_scale( make_napari_viewer, mda_sequence_splits: MDASequence, axis_order: str, + core: CMMCorePlus, ) -> None: - mmc = CMMCorePlus.instance() - mmc.loadSystemConfiguration() viewer = make_napari_viewer() + mmc = core handler = _NapariMDAHandler(mmc, viewer) mmc.setProperty("Objective", "Label", "Nikon 20X Plan Fluor ELWD")