Skip to content

Commit 78c6862

Browse files
catch HTTPError in test_ctx_add_basemap() (#1008)
1 parent 9a6c3f7 commit 78c6862

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test_external_packages.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import matplotlib.pyplot as plt
1414
import dfm_tools as dfmt
1515
import contextily as ctx
16+
from requests import HTTPError
1617

1718

1819
@pytest.mark.unittest
@@ -172,4 +173,7 @@ def test_ctx_add_basemap():
172173
_, ax = plt.subplots()
173174
ax.set_xlim(1.8,3.2)
174175
ax.set_ylim(50.8, 52.2)
175-
ctx.add_basemap(ax=ax,crs="EPSG:4326",attribution=False)
176+
try:
177+
ctx.add_basemap(ax=ax, crs="EPSG:4326", attribution=False)
178+
except HTTPError as e:
179+
print(e)

0 commit comments

Comments
 (0)