cpython: 8c11bbdbac09 (original) (raw)
--- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -451,10 +451,11 @@ class PosixTester(unittest.TestCase): # non-root cannot chown to root, raises OSError self.assertRaises(OSError, chown_func, first_param, 0, 0) check_stat(uid, gid)
self.assertRaises(OSError, chown_func, first_param, -1, 0)[](#l1.7)
check_stat(uid, gid)[](#l1.8) self.assertRaises(OSError, chown_func, first_param, 0, -1)[](#l1.9) check_stat(uid, gid)[](#l1.10)
if gid != 0:[](#l1.11)
self.assertRaises(OSError, chown_func, first_param, -1, 0)[](#l1.12)
check_stat(uid, gid)[](#l1.13) # test illegal types[](#l1.14) for t in str, float:[](#l1.15) self.assertRaises(TypeError, chown_func, first_param, t(uid), gid)[](#l1.16)