Skip to content

Commit

Permalink
Adjust test_api to account for Hubeau API flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
gutzbenj committed Mar 3, 2023
1 parent 45ae2c1 commit dd82c3b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

@pytest.mark.remote
@pytest.mark.parametrize(
"provider,network,kwargs,station_id",
("provider", "network", "kwargs", "station_id"),
[
# German Weather Service (DWD)
# historical observation
Expand All @@ -31,7 +31,9 @@
# NWS Observation
("nws", "observation", {"parameter": "temperature_air_mean_200"}, "KBHM"),
# Eaufrance Hubeau
("eaufrance", "hubeau", {"parameter": "flow"}, None), # noqa: E800
pytest.param(
"eaufrance", "hubeau", {"parameter": "flow"}, None, marks=pytest.mark.xfail(raises=FileNotFoundError)
), # noqa: E800
# ZAMG Observation
("geosphere", "observation", {"parameter": "precipitation_height", "resolution": "daily"}, "5882"),
],
Expand Down
5 changes: 4 additions & 1 deletion tests/ui/explorer/test_explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
from bs4 import BeautifulSoup
from selenium.common.exceptions import (
ElementClickInterceptedException,
ElementNotInteractableException,
NoSuchElementException,
TimeoutException,
)


Expand Down Expand Up @@ -135,7 +138,7 @@ def test_options_reset(wetterdienst_ui, dash_tre):
dash_tre.wait_for_contains_text("#select-period", "")


@pytest.mark.xfail(raises=ElementClickInterceptedException)
@pytest.mark.xfail(raises=(ElementNotInteractableException, NoSuchElementException, TimeoutException))
@pytest.mark.slow
@pytest.mark.cflake
@pytest.mark.explorer
Expand Down

0 comments on commit dd82c3b

Please sign in to comment.