Skip to content

Commit e727daa

Browse files
authored
test: is the leading slash breaking Windows tests? (#1178)
* test: is the leading slash breaking Windows tests? * use a backslash for Windows, forward slash for Linux & MacOS * give up on any kind of leading slash for Windows
1 parent 2d34ce4 commit e727daa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_0692_fsspec_writing.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44
import uproot
55
import uproot.source.fsspec
66

7+
import sys
78
import os
89
import pathlib
910
import fsspec
1011
import numpy as np
1112

13+
is_windows = sys.platform.startswith("win")
14+
1215

1316
def test_fsspec_writing_no_integration(tmp_path):
1417
uri = os.path.join(tmp_path, "some", "path", "file.root")
@@ -46,7 +49,7 @@ def test_fsspec_writing_local(tmp_path, scheme):
4649
)
4750
@pytest.mark.parametrize(
4851
"slash_prefix",
49-
["", "/"],
52+
[""] if is_windows else ["", "/"],
5053
)
5154
def test_fsspec_writing_local_uri(tmp_path, scheme, slash_prefix, filename):
5255
uri = scheme + slash_prefix + os.path.join(tmp_path, "some", "path", filename)

0 commit comments

Comments
 (0)