Skip to content

Commit 65a6568

Browse files
committed
fixes
1 parent e3da44d commit 65a6568

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

upath/tests/cases.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pickle
2+
import sys
23
from pathlib import Path
34

45
import pytest
@@ -37,9 +38,10 @@ def test_glob(self, pathlib_base):
3738
mock_glob = list(self.path.glob("**.txt"))
3839
path_glob = list(pathlib_base.glob("**/*.txt"))
3940

40-
mock_glob_normalized = sorted([a.path[1:] for a in mock_glob])
41+
root = "/" if sys.platform.startswith("win") else ""
42+
mock_glob_normalized = sorted([a.path for a in mock_glob])
4143
path_glob_normalized = sorted(
42-
[str(a).replace("\\", "/") for a in path_glob]
44+
[f"{root}{a}".replace("\\", "/") for a in path_glob]
4345
)
4446

4547
assert mock_glob_normalized == path_glob_normalized

0 commit comments

Comments
 (0)