Skip to content

Commit

Permalink
catch HTTPError in test_ctx_add_basemap() (#1008)
Browse files Browse the repository at this point in the history
  • Loading branch information
veenstrajelmer authored Sep 25, 2024
1 parent 9a6c3f7 commit 78c6862
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_external_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import matplotlib.pyplot as plt
import dfm_tools as dfmt
import contextily as ctx
from requests import HTTPError


@pytest.mark.unittest
Expand Down Expand Up @@ -172,4 +173,7 @@ def test_ctx_add_basemap():
_, ax = plt.subplots()
ax.set_xlim(1.8,3.2)
ax.set_ylim(50.8, 52.2)
ctx.add_basemap(ax=ax,crs="EPSG:4326",attribution=False)
try:
ctx.add_basemap(ax=ax, crs="EPSG:4326", attribution=False)
except HTTPError as e:
print(e)

0 comments on commit 78c6862

Please sign in to comment.