diff --git a/tests/test_0692_fsspec_writing.py b/tests/test_0692_fsspec_writing.py index 6bbaa2e06..6ee42a950 100644 --- a/tests/test_0692_fsspec_writing.py +++ b/tests/test_0692_fsspec_writing.py @@ -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") @@ -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" @@ -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] \ No newline at end of file + assert f["other_tree"]["y"].array().tolist() == [4, 5, 6, 7]