From a72c96362802df6e6e9fb81046cb2107f95c1452 Mon Sep 17 00:00:00 2001 From: Malia Gehan Date: Thu, 28 Mar 2024 16:33:24 -0500 Subject: [PATCH] update tests --- pyproject.toml | 2 +- tests/conftest.py | 11 ----------- tests/test_napari_classes.py | 4 ++-- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d015fbb..dbd08fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ dependencies = [ "plantcv", "matplotlib", "napari", - "PyQt5" + "PyQt6" ] requires-python = ">=3.6" authors = [ diff --git a/tests/conftest.py b/tests/conftest.py index f8e652d..2e840e8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,7 +1,5 @@ import pytest import matplotlib -import napari -from typing import Callable import os @@ -26,15 +24,6 @@ def __init__(self): self.envi_sample_data = os.path.join(self.datadir, filename_hyper) -@pytest.fixture -def viewer_widget(make_napari_viewer: Callable[..., napari.Viewer]): - """Test for PlantCV.Annotate""" - # Read in test data - viewer = make_napari_viewer() - - return viewer - - @pytest.fixture(scope="session") def test_data(): """Test data object for the main PlantCV package.""" diff --git a/tests/test_napari_classes.py b/tests/test_napari_classes.py index 52d145d..8a34010 100644 --- a/tests/test_napari_classes.py +++ b/tests/test_napari_classes.py @@ -2,10 +2,10 @@ from plantcv.annotate import napari_classes -def test_napari_classes(qtbot, viewer_widget): +def test_napari_classes(make_napari_viewer, qtbot): """Test for PlantCV.Annotate""" # Read in test data - viewer = viewer_widget + viewer = make_napari_viewer(show=False) img = np.zeros((100, 100)) coor = [(25, 25), (50, 50)] viewer.add_image(img)