Skip to content

Commit

Permalink
fix of test_river_source_points
Browse files Browse the repository at this point in the history
  • Loading branch information
roeldegoede committed Aug 26, 2024
1 parent 0edb8f0 commit 6620019
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_flwdir.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ def test_river_source_points(hydrography, data_catalog):
kwargs = dict(gdf_riv=gdf_riv, gdf_mask=gdf_mask, reverse_river_geom=True)
gdf_src = river_source_points(src_type="inflow", **kwargs)
assert gdf_src.index.size == 1 # this data only one river
assert gdf_src["riv_idx"].values[0] == 38
assert gdf_src["riv_idx"].values[0] == 2
gdf_src = river_source_points(src_type="outflow", **kwargs)
assert gdf_src.index.size == 1 # this data only one river
assert gdf_src["riv_idx"].values[0] == 34
assert gdf_src["riv_idx"].values[0] == 0
gdf_src = river_source_points(src_type="headwater", **kwargs)
assert gdf_src.index.size == 2
assert np.isin(38, gdf_src["riv_idx"].values)
assert np.isin(2, gdf_src["riv_idx"].values)

# test errors
with pytest.raises(ValueError, match="src_type must be either"):
Expand Down

0 comments on commit 6620019

Please sign in to comment.