Skip to content

Commit

Permalink
fix: remove unrelated features.
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Rösner committed Nov 9, 2023
1 parent 7875821 commit 5cce618
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
21 changes: 0 additions & 21 deletions fsspec/tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import io
import sys
from pathlib import Path
from unittest.mock import Mock

import pytest
Expand All @@ -9,7 +8,6 @@
from fsspec.utils import (
can_be_local,
common_prefix,
get_protocol,
infer_storage_options,
merge_offset_ranges,
mirror_from,
Expand Down Expand Up @@ -335,24 +333,6 @@ def test_log():
assert logger.level == logging.DEBUG


@pytest.mark.parametrize(
"par",
[
("afile", "file"),
("file://afile", "file"),
("noproto://afile", "noproto"),
("noproto::stuff", "noproto"),
("simplecache::stuff", "simplecache"),
("simplecache://stuff", "simplecache"),
("s3://afile", "s3"),
(Path("afile"), "file"),
],
)
def test_get_protocol(par):
url, outcome = par
assert get_protocol(url) == outcome


@pytest.mark.parametrize(
"par",
[
Expand All @@ -362,7 +342,6 @@ def test_get_protocol(par):
("noproto::stuff", False),
("simplecache::stuff", True),
("simplecache://stuff", True),
(Path("afile"), True),
],
)
def test_can_local(par):
Expand Down
1 change: 0 additions & 1 deletion fsspec/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,6 @@ def isfilelike(f: Any) -> TypeGuard[IO[bytes]]:


def get_protocol(url: str) -> str:
url = stringify_path(url)
parts = re.split(r"(\:\:|\://)", url, 1)
if len(parts) > 1:
return parts[0]
Expand Down

0 comments on commit 5cce618

Please sign in to comment.