aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_pathlib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_pathlib')
-rw-r--r--Lib/test/test_pathlib/test_pathlib.py7
-rw-r--r--Lib/test/test_pathlib/test_pathlib_abc.py3
2 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_pathlib/test_pathlib.py b/Lib/test/test_pathlib/test_pathlib.py
index 651d66656cb..5fd1a41cbee 100644
--- a/Lib/test/test_pathlib/test_pathlib.py
+++ b/Lib/test/test_pathlib/test_pathlib.py
@@ -1263,6 +1263,13 @@ class PathTest(test_pathlib_abc.DummyPathTest, PurePathTest):
self.assertEqual(
set(P('.').glob('**/*/*')), {P("dirD/fileD")})
+ def test_glob_inaccessible(self):
+ P = self.cls
+ p = P(self.base, "mydir1", "mydir2")
+ p.mkdir(parents=True)
+ p.parent.chmod(0)
+ self.assertEqual(set(p.glob('*')), set())
+
def test_rglob_pathlike(self):
P = self.cls
p = P(self.base, "dirC")
diff --git a/Lib/test/test_pathlib/test_pathlib_abc.py b/Lib/test/test_pathlib/test_pathlib_abc.py
index 6656b032cde..aadecbc142c 100644
--- a/Lib/test/test_pathlib/test_pathlib_abc.py
+++ b/Lib/test/test_pathlib/test_pathlib_abc.py
@@ -8,6 +8,7 @@ import unittest
from pathlib._abc import UnsupportedOperation, ParserBase, PurePathBase, PathBase
import posixpath
+from test.support import is_wasi
from test.support.os_helper import TESTFN
@@ -1920,6 +1921,8 @@ class DummyPathTest(DummyPurePathTest):
}
self.assertEqual(given, {p / x for x in expect})
+ # See https://github.com/WebAssembly/wasi-filesystem/issues/26
+ @unittest.skipIf(is_wasi, "WASI resolution of '..' parts doesn't match POSIX")
def test_glob_dotdot(self):
# ".." is not special in globs.
P = self.cls