cpython: 9b37e53838eb (original) (raw)

--- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -224,30 +224,42 @@ class PosixTester(unittest.TestCase): def _test_all_chown_common(self, chown_func, first_param, stat_func): """Common code for chown, fchown and lchown tests."""

+

@@ -256,11 +268,17 @@ class PosixTester(unittest.TestCase): else: # non-root cannot chown to root, raises OSError self.assertRaises(OSError, chown_func, first_param, 0, 0)

@unittest.skipUnless(hasattr(posix, 'chown'), "test needs os.chown()") def test_chown(self):