Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
bpo-40014: Update test_posix
  • Loading branch information
corona10 committed Mar 19, 2020
commit 29ebba57801226584a56fc960a54def806d8f96b
6 changes: 4 additions & 2 deletions Lib/test/test_posix.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,8 +1025,10 @@ def _create_and_do_getcwd(dirname, current_path_length = 0):
def test_getgrouplist(self):
user = pwd.getpwuid(os.getuid())[0]
group = pwd.getpwuid(os.getuid())[3]
self.assertIn(group, posix.getgrouplist(user, group))

try:
self.assertIn(group, posix.getgrouplist(user, group))
except OSError:
raise unittest.SkipTest("os.getgrouplist() is not available")
Comment thread
corona10 marked this conversation as resolved.
Outdated

@unittest.skipUnless(hasattr(os, 'getegid'), "test needs os.getegid()")
def test_getgroups(self):
Expand Down