From 78c68624388f4b8a3e1815d1754e6b1f15ca9675 Mon Sep 17 00:00:00 2001 From: veenstrajelmer <60435591+veenstrajelmer@users.noreply.github.com> Date: Wed, 25 Sep 2024 13:51:06 +0200 Subject: [PATCH] catch HTTPError in test_ctx_add_basemap() (#1008) --- tests/test_external_packages.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_external_packages.py b/tests/test_external_packages.py index 424152f54..2f52d95a5 100644 --- a/tests/test_external_packages.py +++ b/tests/test_external_packages.py @@ -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 @@ -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)