Skip to content

Commit

Permalink
test: is the leading slash breaking Windows tests? (#1178)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jpivarski authored Mar 20, 2024
1 parent 2d34ce4 commit e727daa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_0692_fsspec_writing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@
import uproot
import uproot.source.fsspec

import sys
import os
import pathlib
import fsspec
import numpy as np

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


def test_fsspec_writing_no_integration(tmp_path):
uri = os.path.join(tmp_path, "some", "path", "file.root")
Expand Down Expand Up @@ -46,7 +49,7 @@ def test_fsspec_writing_local(tmp_path, scheme):
)
@pytest.mark.parametrize(
"slash_prefix",
["", "/"],
[""] if is_windows else ["", "/"],
)
def test_fsspec_writing_local_uri(tmp_path, scheme, slash_prefix, filename):
uri = scheme + slash_prefix + os.path.join(tmp_path, "some", "path", filename)
Expand Down

0 comments on commit e727daa

Please sign in to comment.