Skip to content

Commit

Permalink
Update test_geospatial_read_geotif.py
Browse files Browse the repository at this point in the history
  • Loading branch information
HaleySchuhl committed Aug 26, 2024
1 parent 207196f commit ad1ef2d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_geospatial_read_geotif.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def test_geospatial_read_geotif_rgb(test_data):
"""Test for plantcv-geospatial."""
# read in small 5-band tif image
img = read_geotif(filename=test_data.rgb_tif, bands="R,G,B")
assert img.array_data.shape[2] == 3
assert img.pseudo_rgb.shape == (284, 261, 3)


def test_geospatial_read_geotif_bad_input(test_data):
Expand All @@ -35,12 +35,13 @@ def test_geospatial_read_geotif_bad_crop(test_data):
def test_geospatial_read_geotif_polygon_crop(test_data):
"""Test for plantcv-geospatial."""
# read in rgb image with a polygon-type shapefile
img = read_geotif(filename=test_data.rgb_tif, bands=[650,560,480], cropto=test_data.square_crop)
img = read_geotif(filename=test_data.rgb_tif, bands=[650, 560, 480],
cropto=test_data.square_crop)
assert img.pseudo_rgb.shape == (80, 83, 3)


def test_geospatial_read_geotif_point_crop(test_data):
"""Test for plantcv-geospatial."""
# read in rgb image with a polygon-type shapefile
img = read_geotif(filename=test_data.rgb_tif, bands="R,G,B", cropto=test_data.point_crop)
assert img.pseudo_rgb.shape == (41, 46, 3)

0 comments on commit ad1ef2d

Please sign in to comment.