|
20 | 20 | from test.support import is_emscripten, is_wasi, is_wasm32 |
21 | 21 | from test.support import infinite_recursion |
22 | 22 | from test.support import os_helper |
23 | | -from test.support import requires_root |
| 23 | +from test.support import requires_root_user |
24 | 24 | from test.support.os_helper import TESTFN, FS_NONASCII, FakePath |
25 | 25 | try: |
26 | 26 | import fcntl |
@@ -1550,7 +1550,7 @@ def raiser(*args, **kwargs): |
1550 | 1550 | self.assertRaises(FileNotFoundError, source.copy, target) |
1551 | 1551 |
|
1552 | 1552 | @unittest.skipIf(sys.platform == "win32" or sys.platform == "wasi", "directories are always readable on Windows and WASI") |
1553 | | - @requires_root |
| 1553 | + @requires_root_user |
1554 | 1554 | def test_copy_dir_no_read_permission(self): |
1555 | 1555 | base = self.cls(self.base) |
1556 | 1556 | source = base / 'dirE' |
@@ -2023,7 +2023,7 @@ def test_owner(self): |
2023 | 2023 | self.assertEqual(expected_name, p.owner()) |
2024 | 2024 |
|
2025 | 2025 | @unittest.skipUnless(pwd, "the pwd module is needed for this test") |
2026 | | - @requires_root |
| 2026 | + @requires_root_user |
2027 | 2027 | def test_owner_no_follow_symlinks(self): |
2028 | 2028 | all_users = [u.pw_uid for u in pwd.getpwall()] |
2029 | 2029 | if len(all_users) < 2: |
@@ -2058,7 +2058,7 @@ def test_group(self): |
2058 | 2058 | self.assertEqual(expected_name, p.group()) |
2059 | 2059 |
|
2060 | 2060 | @unittest.skipUnless(grp, "the grp module is needed for this test") |
2061 | | - @requires_root |
| 2061 | + @requires_root_user |
2062 | 2062 | def test_group_no_follow_symlinks(self): |
2063 | 2063 | all_groups = [g.gr_gid for g in grp.getgrall()] |
2064 | 2064 | if len(all_groups) < 2: |
|
0 commit comments