From c0fb7f589050d14a21be526ad785f76892ddbc34 Mon Sep 17 00:00:00 2001 From: Forrest Williams Date: Wed, 29 May 2024 15:43:25 -0500 Subject: [PATCH] fix broken test --- tests/test_create_browse.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/test_create_browse.py b/tests/test_create_browse.py index b2c1585..1c99f96 100644 --- a/tests/test_create_browse.py +++ b/tests/test_create_browse.py @@ -16,11 +16,13 @@ def test_normalize_image_array(): def test_create_browse_arry(): - test_vv = np.array([[0, 1], [2, 3], [np.nan, np.nan]]) - test_vh = np.array([[np.nan, np.nan], [4, 5], [6, 7]]) + vv_min, vv_max = 0.02, 0.3 + test_vv = np.array([[0, vv_min], [(vv_min + vv_max) / 2, vv_max], [np.nan, np.nan]]) + vh_min, vh_max = 0.003, 0.08 + test_vh = np.array([[np.nan, np.nan], [(vh_min + vh_max) / 2, vh_max], [0, vh_min]]) output_array = create_browse.create_browse_array(test_vv, test_vh) assert output_array.shape == (3, 2, 4) - assert np.array_equal(output_array[:, :, 0], np.array([[0, 145], [210, 255], [0, 0]])) - assert np.array_equal(output_array[:, :, 1], np.array([[0, 0], [0, 145], [210, 255]])) + assert np.array_equal(output_array[:, :, 0], np.array([[0, 0], [180, 255], [0, 0]])) + assert np.array_equal(output_array[:, :, 1], np.array([[0, 0], [180, 255], [0, 0]])) assert np.array_equal(output_array[:, :, 0], output_array[:, :, 2]) assert np.array_equal(output_array[:, :, 3], np.array([[0, 0], [255, 255], [0, 0]]))