Skip to content

Commit

Permalink
Add test for filepath expandsion with file mode=x
Browse files Browse the repository at this point in the history
  • Loading branch information
GenevieveBuckley committed Aug 15, 2023
1 parent 39abf15 commit 26603a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fsspec/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
_expand_paths,
expand_paths_if_needed,
get_compression,
get_fs_token_paths,
open_files,
open_local,
)
Expand Down Expand Up @@ -75,6 +76,11 @@ def test_expand_error():
_expand_paths("*.*", None, 1)


@pytest.mark.parametrize("mode", ["w", "w+", "x", "x+"])
def test_expand_fs_token_paths(mode):
assert len(get_fs_token_paths("path", mode, num=2, expand=True)[-1]) == 2


def test_openfile_api(m):
m.open("somepath", "wb").write(b"data")
of = OpenFile(m, "somepath")
Expand Down

0 comments on commit 26603a5

Please sign in to comment.