Skip to content

Commit 9fed00b

Browse files
committed
test: adjust fspath test for windows
1 parent b6fa0c0 commit 9fed00b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

upath/tests/test_core.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,15 +255,17 @@ def test_compare_to_pathlib_path_ne():
255255
assert pathlib.Path("/bucket/folder") == UPath("/bucket/folder")
256256

257257

258-
def test_handle_fspath_args():
258+
def test_handle_fspath_args(tmp_path):
259+
f = os.fspath(tmp_path.joinpath("file.txt"))
260+
259261
class X:
260262
def __str__(self):
261263
raise ValueError("should not be called")
262264

263265
def __fspath__(self):
264-
return "/some/path"
266+
return f
265267

266-
assert UPath(X()).path == "/some/path"
268+
assert UPath(X()).path == f
267269

268270

269271
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)