From: Petr Viktorin Date: Wed, 26 Jun 2024 09:36:09 +0000 (+0200) Subject: gh-73991: Skip permission test if running as *nix superuser (GH-120994) X-Git-Tag: v3.14.0a1~1324 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=90565972243f33dcd40d60a4f1474b97174fe304;p=thirdparty%2FPython%2Fcpython.git gh-73991: Skip permission test if running as *nix superuser (GH-120994) --- diff --git a/Lib/test/test_pathlib/test_pathlib.py b/Lib/test/test_pathlib/test_pathlib.py index 6b5e90fbcf71..da6d82465d29 100644 --- a/Lib/test/test_pathlib/test_pathlib.py +++ b/Lib/test/test_pathlib/test_pathlib.py @@ -654,6 +654,7 @@ class PathTest(test_pathlib_abc.DummyPathTest, PurePathTest): self.assertEqual(f.read().strip(), b"this is file A") @unittest.skipIf(sys.platform == "win32" or sys.platform == "wasi", "directories are always readable on Windows and WASI") + @unittest.skipIf(root_in_posix, "test fails with root privilege") def test_copytree_no_read_permission(self): base = self.cls(self.base) source = base / 'dirE'