summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-02-21 12:33:45 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-02-21 12:33:45 (GMT)
commit484dee38e665e20f961b18f27a82b3224341c1be (patch)
tree67fad07b090ea9e41fda7beaf76620bdf5e5e6dd
parentd5bdb1f140f9f74746ff6413194ddd119ce5f1de (diff)
downloadcpython-484dee38e665e20f961b18f27a82b3224341c1be.zip
cpython-484dee38e665e20f961b18f27a82b3224341c1be.tar.gz
cpython-484dee38e665e20f961b18f27a82b3224341c1be.tar.bz2
Issue #17248: Fix os.*chown() testing when user is in root group.
-rw-r--r--Lib/test/test_posix.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
index 073e069..b0a8cdf 100644
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -271,7 +271,7 @@ class PosixTester(unittest.TestCase):
check_stat(uid, gid)
self.assertRaises(OSError, chown_func, first_param, 0, -1)
check_stat(uid, gid)
- if gid != 0:
+ if 0 not in os.getgroups():
self.assertRaises(OSError, chown_func, first_param, -1, 0)
check_stat(uid, gid)
# test illegal types