We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6fa0c0 commit 9fed00bCopy full SHA for 9fed00b
upath/tests/test_core.py
@@ -255,15 +255,17 @@ def test_compare_to_pathlib_path_ne():
255
assert pathlib.Path("/bucket/folder") == UPath("/bucket/folder")
256
257
258
-def test_handle_fspath_args():
+def test_handle_fspath_args(tmp_path):
259
+ f = os.fspath(tmp_path.joinpath("file.txt"))
260
+
261
class X:
262
def __str__(self):
263
raise ValueError("should not be called")
264
265
def __fspath__(self):
- return "/some/path"
266
+ return f
267
- assert UPath(X()).path == "/some/path"
268
+ assert UPath(X()).path == f
269
270
271
@pytest.mark.parametrize(
0 commit comments