From ad1ef2d4736f616bc342e4e8c4c2de5bcd9666b4 Mon Sep 17 00:00:00 2001 From: HaleySchuhl Date: Mon, 26 Aug 2024 11:46:24 -0500 Subject: [PATCH] Update test_geospatial_read_geotif.py --- tests/test_geospatial_read_geotif.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_geospatial_read_geotif.py b/tests/test_geospatial_read_geotif.py index 99969bf..7f268b8 100644 --- a/tests/test_geospatial_read_geotif.py +++ b/tests/test_geospatial_read_geotif.py @@ -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): @@ -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) - \ No newline at end of file