Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug intermittent testing failures #26

Merged
merged 30 commits into from
May 16, 2024
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
20bec6b
Try making figure sizes smaller
nfahlgren May 8, 2024
1bff455
Increase setup delay
nfahlgren May 10, 2024
6e02752
Increase delay to 10s
nfahlgren May 10, 2024
8788098
Change screen resolution
nfahlgren May 10, 2024
f05f741
Update continuous-integration.yml
maliagehan May 15, 2024
df608d0
Update continuous-integration.yml
maliagehan May 15, 2024
d162ec9
Update continuous-integration.yml
maliagehan May 15, 2024
6340f0d
Update continuous-integration.yml
maliagehan May 15, 2024
74c778c
Update continuous-integration.yml
maliagehan May 15, 2024
d62b213
Update continuous-integration.yml
maliagehan May 15, 2024
d5afb93
Update continuous-integration.yml
maliagehan May 15, 2024
93640aa
Update continuous-integration.yml
maliagehan May 15, 2024
4dc2d78
Update continuous-integration.yml
maliagehan May 15, 2024
0cf7668
Update continuous-integration.yml
maliagehan May 15, 2024
f990912
Update continuous-integration.yml
maliagehan May 15, 2024
3afe91b
test
maliagehan May 15, 2024
cf8b3a4
Create test_annotate_points.py
maliagehan May 15, 2024
b1e1812
Create test_annotate_get_centroids.py
maliagehan May 15, 2024
ecfbc68
Create test_napari_open.py
maliagehan May 15, 2024
cb848b5
Create test_napari_classes.py
maliagehan May 15, 2024
9a0fa6e
Create test_napari_label_classes.py
maliagehan May 15, 2024
c23e57b
viwer close
maliagehan May 15, 2024
c6035cb
Update test_napari_label_classes.py
maliagehan May 15, 2024
4f3555a
Update test_napari_open.py
maliagehan May 15, 2024
dbb565f
Create test_napari_join_labels.py
maliagehan May 15, 2024
b170a9a
Delete test_napari_join_labels.py
maliagehan May 15, 2024
6070954
Create test_napari_join_labels.py
maliagehan May 15, 2024
272f082
line returns.
maliagehan May 15, 2024
3daac8b
Update continuous-integration.yml
maliagehan May 16, 2024
19129c4
Update continuous-integration.yml
maliagehan May 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Create test_napari_open.py
napari open
  • Loading branch information
maliagehan committed May 15, 2024
commit ecfbc68ac768937253f14b7a08f95cd06ce35f85
40 changes: 40 additions & 0 deletions tests/test_napari_open.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import numpy as np
from plantcv.annotate import napari_open
from plantcv.plantcv import readimage


def test_napari_open_rgb(test_data):
"""Test for PlantCV.Annotate"""
# Read in test data
img, _, _ = readimage(test_data.small_rgb_img)
viewer = napari_open(img, show=False)
coor = [(25, 25), (50, 50)]
viewer.add_points(np.array(coor), symbol="o", name="total",
face_color="red", size=1)

assert len(viewer.layers['total'].data) == 2


def test_napari_open_gray(test_data):
"""Test for PlantCV.Annotate"""
# Read in test data
img, _, _ = readimage(test_data.kmeans_seed_gray_img)
viewer = napari_open(img, show=False)
coor = [(25, 25), (50, 50)]
viewer.add_points(np.array(coor), symbol="o", name="total",
face_color="red", size=1)

assert len(viewer.layers['total'].data) == 2


def test_napari_open_envi(test_data):
"""Test for PlantCV.Annotate"""
# Read in test data
img = readimage(test_data.envi_sample_data, mode='envi')
img = img.array_data
viewer = napari_open(img, show=False)
coor = [(25, 25), (50, 50)]
viewer.add_points(np.array(coor), symbol="o", name="total",
face_color="red", size=1)

assert len(viewer.layers['total'].data) == 2