cpython: a0baf5347cd1 (original) (raw)

--- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -234,30 +234,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."""

+

@@ -266,11 +278,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):