From e727daa4264180951a8beec1a67acdd17041ea98 Mon Sep 17 00:00:00 2001 From: Jim Pivarski Date: Wed, 20 Mar 2024 14:19:28 -0400 Subject: [PATCH] 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 --- tests/test_0692_fsspec_writing.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_0692_fsspec_writing.py b/tests/test_0692_fsspec_writing.py index 2e3831f17..b82b7dc04 100644 --- a/tests/test_0692_fsspec_writing.py +++ b/tests/test_0692_fsspec_writing.py @@ -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") @@ -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)