Skip to content

Commit

Permalink
Mock the veg and bare thresholds in the unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
tebadi committed Nov 22, 2024
1 parent 93dfded commit d999fa0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/test_lc_l4_natural_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,13 @@ def test_ns():
l34, urban, woody, bs_pc_50, pv_pc_50, cultivated, water_frequency, water_season
)

stats_l4 = StatsLccsLevel4()

level3 = lc_level3.lc_level3(xx)
lifeform = lc_lifeform.lifeform(xx)
veg_cover = l4_veg_cover.canopyco_veg_con(xx, stats_l4.veg_threshold)


veg_threshold = [1, 4, 15, 40, 65, 100]
veg_cover = l4_veg_cover.canopyco_veg_con(xx, veg_threshold)

# Apply cultivated to match the code in Level4 processing
l4_ctv = l4_cultivated.lc_l4_cultivated(xx.level_3_4, level3, lifeform, veg_cover)
Expand All @@ -204,8 +207,9 @@ def test_ns():
)

# Bare gradation
bare_threshold = [20, 60]
bare_gradation = l4_bare_gradation.bare_gradation(
xx, stats_l4.bare_threshold, veg_cover
xx, bare_threshold, veg_cover
)

l4_ctv_ntv_nav_surface = l4_surface.lc_l4_surface(
Expand Down

0 comments on commit d999fa0

Please sign in to comment.