Skip to content

Commit 76a9430

Browse files
authored
tests: remove two unused helper functions introduced in #492 (#505)
1 parent 01b241a commit 76a9430

2 files changed

Lines changed: 0 additions & 31 deletions

File tree

upath/tests/implementations/test_github.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,6 @@
1818
)
1919

2020

21-
def has_internet_connection():
22-
import requests
23-
24-
try:
25-
requests.get("http://example.com")
26-
except requests.exceptions.ConnectionError:
27-
return False
28-
else:
29-
return True
30-
31-
3221
def xfail_on_github_rate_limit(func):
3322
"""
3423
Method decorator to mark test as xfail when GitHub rate limit is exceeded.

upath/tests/implementations/test_hf.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import functools
2-
31
import pytest
42
from fsspec import get_filesystem_class
53

@@ -14,24 +12,6 @@
1412
pytestmark = pytest.mark.skip
1513

1614

17-
def xfail_on_hf_service_unavailable(func):
18-
"""
19-
Method decorator to mark test as xfail when HuggingFace service is unavailable.
20-
"""
21-
from httpx import HTTPStatusError
22-
23-
@functools.wraps(func)
24-
def wrapped_method(self, *args, **kwargs):
25-
try:
26-
return func(self, *args, **kwargs)
27-
except HTTPStatusError as err:
28-
if err.response.status_code == 503:
29-
pytest.xfail("HuggingFace API not reachable")
30-
raise
31-
32-
return wrapped_method
33-
34-
3515
def test_hfpath():
3616
path = UPath("hf://HuggingFaceTB/SmolLM2-135M")
3717
assert isinstance(path, HfPath)

0 commit comments

Comments
 (0)