Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
haesleinhuepf committed May 7, 2022
1 parent 4510032 commit 7389b43
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions napari_skimage_regionprops/_tests/test_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ def test_regionprops(make_napari_viewer):

# generate a parametric image
from napari_skimage_regionprops import visualize_measurement_on_labels
layer = visualize_measurement_on_labels(labels_layer, "area", viewer)
assert layer is not None
result = visualize_measurement_on_labels(labels_layer, "area", viewer)
assert result is not None

reference = np.asarray([
[0, 0, 0, 0, 0, 0, 0],
Expand All @@ -67,9 +67,9 @@ def test_regionprops(make_napari_viewer):
[0, 0, 6, 6, 6, 0, 0],
[0, 0, 6, 6, 6, 0, 1],
])
print("layer.data: ", layer.data)
print("result: ", result)
print("reference: ", np.asarray(reference))
assert np.array_equal(layer.data, reference)
assert np.array_equal(result, reference)

# replace table
from napari_skimage_regionprops import add_table
Expand Down

0 comments on commit 7389b43

Please sign in to comment.