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 60f888a commit 48b0be1Copy full SHA for 48b0be1
upath/tests/implementations/test_local.py
@@ -1,3 +1,4 @@
1
+import os
2
from pathlib import Path
3
4
import pytest
@@ -47,3 +48,15 @@ def test_home(self):
47
48
cwd = type(self.path).home()
49
assert isinstance(cwd, LocalPath)
50
assert cwd.path == Path.home().as_posix()
51
+
52
53
+@pytest.mark.parametrize(
54
+ "protocol,path",
55
+ [
56
+ (None, "/tmp/somefile.txt"),
57
+ ("file", "file:///tmp/somefile.txt"),
58
+ ("local", "local:///tmp/somefile.txt"),
59
+ ],
60
+)
61
+def test_local_paths_are_pathlike(protocol, path):
62
+ assert isinstance(UPath(path, protocol=protocol), os.PathLike)
0 commit comments