1. Larry Hastings
  2. python-clinic

Commits

Serhiy Storchaka  committed d496855 Merge

Issue #17248: Fix os.*chown() testing when user is in root group.

  • Participants
  • Parent commits a11ddd6, a4e348c
  • Branches default

Comments (0)

Files changed (1)

File Lib/test/test_posix.py

View file
             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