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

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


http://hg.python.org/cpython/rev/a4e348c4b5d3
changeset:   82298:a4e348c4b5d3
branch:      3.3
parent:      82294:0e2d89f34ae5
parent:      82297:0f7383e6ced7
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Thu Feb 21 14:34:59 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
@@ -453,7 +453,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