8000 bpo-36046: Fix buildbot failures from the PR. by gpshead · Pull Request #16091 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-36046: Fix buildbot failures from the PR. #16091

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 13, 2019
Merged
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
24 changes: 21 additions & 3 deletions Lib/test/test_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -1762,8 +1762,10 @@ def test_user(self):
[sys.executable, "-c",
"import os; print(os.getuid())"],
user=user)
except PermissionError: # errno.EACCES
pass
except OSError as e:
if e.errno != errno.EPERM:
if e.errno not in (errno.EACCES, errno.EPERM):
raise
else:
if isinstance(user, str):
Expand All @@ -1789,7 +1791,15 @@ def test_user_error(self):
def test_group(self):
gid = os.getegid()
group_list = [65534 if gid != 65534 else 65533]
name_group = "nogroup" if sys.platform != 'darwin' else "staff"
for name_group in ('staff', 'nogroup', 'grp'):
if grp:
try:
grp.getgrnam(name_group)
except KeyError:
continue
break
else:
raise unittest.SkipTest('No identified group name to use for this test on this platform.')

if grp is not None:
group_list.append(name_group)
Expand Down Expand Up @@ -1830,7 +1840,15 @@ def test_group_error(self):
def test_extra_groups(self):
gid = os.getegid()
group_list = [65534 if gid != 65534 else 65533]
name_group = "nogroup" if sys.platform != 'darwin' else "staff"
for name_group in ('staff', 'nogroup', 'grp'):
if grp:
try:
grp.getgrnam(name_group)
except KeyError:
continue
break
else:
raise unittest.SkipTest('No identified group name to use for this test on this platform.')
perm_error = False

if grp is not None:
Expand Down
0