Skip to content

Commit

Permalink
fix veg frequency test
Browse files Browse the repository at this point in the history
  • Loading branch information
Emma Ai committed Dec 5, 2024
1 parent 51e432b commit b72dcb7
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tests/test_landcover_plugin_a0.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,14 +400,15 @@ def test_reduce(fc_wo_dataset):
xx = stats_veg.reduce(xx).compute()
expected_value = np.array(
[
[1, 255, 0, 255, 255, 255, 255],
[1, 255, 255, 255, 255, 255, 255],
[255, 0, 255, 255, 1, 255, 255],
[255, 255, 1, 255, 255, 255, 255],
[2, 255, 255, 255, 255, 255, 255],
[2, 255, 255, 255, 255, 255, 255],
[255, 255, 255, 255, 2, 255, 255],
[255, 255, 2, 255, 255, 255, 255],
[255, 255, 255, 255, 255, 255, 255],
[255, 1, 255, 255, 255, 255, 255],
[255, 255, 255, 255, 255, 255, 0],
]
[255, 2, 255, 255, 255, 255, 255],
[255, 255, 255, 255, 255, 255, 255],
],
dtype="uint8",
)

assert (xx.veg_frequency.data == expected_value).all()
Expand Down

0 comments on commit b72dcb7

Please sign in to comment.