Skip to content

Commit

Permalink
skip writing via xrootd test if version of fsspec-xrootd is < 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
maxgalli committed Feb 20, 2025
1 parent 0e89399 commit 158213b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/test_0692_fsspec_writing.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@
import fsspec
import numpy as np
import awkward as ak
from packaging import version
import importlib.metadata

is_windows = sys.platform.startswith("win")

import fsspec_xrootd
fsspec_xrootd_version = importlib.metadata.version("fsspec-xrootd")


def test_fsspec_writing_no_integration(tmp_path):
uri = os.path.join(tmp_path, "some", "path", "file.root")
Expand Down Expand Up @@ -221,6 +226,10 @@ def test_fsspec_writing_memory(tmp_path, scheme):
assert f["tree"]["x"].array().tolist() == [1, 2, 3]


@pytest.mark.skipif(
version.parse(fsspec_xrootd_version) < version.parse("0.5.0"),
reason="fsspec-xrootd>=0.5.0 is required",
)
def test_write_append_fsspec_xrootd(xrootd_server):
remote_path, _ = xrootd_server
filename = "file.root"
Expand All @@ -237,4 +246,4 @@ def test_write_append_fsspec_xrootd(xrootd_server):
assert f["tree"]["x"].array().tolist() == [1, 2, 3]
assert f["tree"]["y"].array().tolist() == [4, 5, 6]
assert f["other_tree"]["x"].array().tolist() == [1, 2, 3, 4]
assert f["other_tree"]["y"].array().tolist() == [4, 5, 6, 7]
assert f["other_tree"]["y"].array().tolist() == [4, 5, 6, 7]

0 comments on commit 158213b

Please sign in to comment.