[Python-checkins] cpython (3.2): Issue #17248: Fix os.*chown() testing when user is in root group.

serhiy.storchaka python-checkins at python.org
Thu Feb 21 13:38:05 CET 2013


http://hg.python.org/cpython/rev/0f7383e6ced7
changeset:   82297:0f7383e6ced7
branch:      3.2
parent:      82293:1b9de5788698
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Thu Feb 21 14:34:36 2013 +0200
summary:
  Issue #17248: Fix os.*chown() testing when user is in root group.

files:
  Lib/test/test_posix.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -281,7 +281,7 @@
             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

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list