Skip to content

Commit

Permalink
add bad input test
Browse files Browse the repository at this point in the history
  • Loading branch information
HaleySchuhl committed Mar 27, 2024
1 parent 82a9d4f commit 0099991
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_geospatial_read_geotif.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Tests for geospatial.readd_geotif."""

import cv2
import pytest
import plantcv.geospatial.read_geotif as read_geotif


Expand All @@ -9,3 +10,10 @@ def test_geospatial_read_geotif(test_data):
# read in small 5-band tif image
img = read_geotif(filename=test_data.cropped_tif, bands="B,G,R,RE,N")
assert img.array_data.shape[2] == 5


def test_geospatial_read_geotif_bad_input(test_data):
"""Test for plantcv-geospatial."""
# read in small 5-band tif image
with pytest.raises(RuntimeError):
img = read_geotif(filename=test_data.cropped_tif, bands="p")

0 comments on commit 0099991

Please sign in to comment.