From e1e0b8844885b2469fbb7177a0860346f2c6a4dc Mon Sep 17 00:00:00 2001 From: Jirka B Date: Fri, 31 Jan 2025 09:45:37 +0100 Subject: [PATCH] HTTP Error 504: Gateway Time-out --- tests/unittests/_helpers/wrappers.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/unittests/_helpers/wrappers.py b/tests/unittests/_helpers/wrappers.py index 291d1b3d1fd..b48e1a6e77d 100644 --- a/tests/unittests/_helpers/wrappers.py +++ b/tests/unittests/_helpers/wrappers.py @@ -1,6 +1,7 @@ import os from functools import wraps from typing import Any, Callable, Optional +from urllib.error import HTTPError import pytest @@ -47,6 +48,10 @@ def run_test(*args: Any, **kwargs: Any) -> Optional[Any]: try: return function(*args, **kwargs) + except HTTPError as ex: + if ex.code != 504: # HTTP Error 504: Gateway Time-out + raise ex + pytest.skip(reason) except URLError as ex: if "Error 403: Forbidden" not in str(ex) or not ALLOW_SKIP_IF_BAD_CONNECTION: raise ex