Skip to content

Commit

Permalink
MNT: Update the expected values based on the changes in the web servi…
Browse files Browse the repository at this point in the history
…ce. [skip ci]
  • Loading branch information
Taher Chegini committed Apr 25, 2024
1 parent 1371b06 commit cebeb4c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions py3dep/py3dep.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,10 +691,10 @@ def query_3dep_sources(
>>> bbox = (-69.77, 45.07, -69.31, 45.45)
>>> src = py3dep.query_3dep_sources(bbox)
>>> src.groupby("dem_res")["OBJECTID"].count().to_dict()
{'10m': 8, '1m': 3, '30m': 8}
{'10m': 8, '1m': 2, '30m': 8}
>>> src = py3dep.query_3dep_sources(bbox, res="1m")
>>> src.groupby("dem_res")["OBJECTID"].count().to_dict()
{'1m': 3}
{'1m': 2}
"""
if not isinstance(bbox, Sequence) or len(bbox) != 4:
raise InputTypeError("bbox", "a tuple of length 4")
Expand Down
6 changes: 3 additions & 3 deletions tests/test_py3dep.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def test_fill_depressions():

@pytest.mark.parametrize(
("source", "expected"),
[("tnm", 356.093), ("tep", 356.139)],
[("tnm", 356.589), ("tep", 356.139)],
)
def test_bycoords(source, expected):
coords = [(-7766049.664788851, 5691929.739021257)]
Expand Down Expand Up @@ -142,8 +142,8 @@ def test_query_3dep_source():
res_all = src.groupby("dem_res")["OBJECTID"].count().to_dict()
src = py3dep.query_3dep_sources(GEOM.bounds, res="1m")
res_1m = src.groupby("dem_res")["OBJECTID"].count().to_dict()
assert res_all == {"10m": 8, "1m": 3, "30m": 8}
assert res_1m == {"1m": 3}
assert res_all == {"10m": 8, "1m": 2, "30m": 8}
assert res_1m == {"1m": 2}


class TestCLI:
Expand Down

0 comments on commit cebeb4c

Please sign in to comment.