Skip to content
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

bpo-32601: Skip PosixPathTest.test_expanduser if no other user is found #5246

Merged
merged 1 commit into from
May 14, 2018

Conversation

andersk
Copy link
Contributor

@andersk andersk commented Jan 19, 2018

This happens in the NixOS build sandbox, for example, where the only other user is nobody with home directory /.

https://bugs.python.org/issue32601

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

Thanks again to your contribution and we look forward to looking at it!

@andersk andersk changed the title Skip PosixPathTest::test_expanduser if no other user is found bpo-32601: Skip PosixPathTest.test_expanduser if no other user is found Jan 19, 2018
@andersk
Copy link
Contributor Author

andersk commented Mar 1, 2018

My b.p.o profile (also named andersk) shows that I signed the CLA and linked my GitHub username to it the same day I submitted this PR. Is the bot going to update this?

@@ -2145,6 +2145,8 @@ def test_expanduser(self):
otherhome = pwdent.pw_dir.rstrip('/')
if othername != username and otherhome:
break
else:
self.skipTest('no other user with home != /')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will skip the whole test even if most checks are not related to othername.

I would set othername = username and otherhome = userhome or set othername = None and skip only checks for p3.

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole test shouldn't be skipped. Try to test so much as possible with a single user.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

This happens in the NixOS build sandbox, for example, where the only
other user is nobody with home directory /.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
@andersk
Copy link
Contributor Author

andersk commented May 13, 2018

I have made the requested changes; please review again.

@bedevere-bot
Copy link

Thanks for making the requested changes!

@serhiy-storchaka: please review the changes made to this pull request.

@miss-islington
Copy link
Contributor

Thanks @andersk for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.6, 3.7.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 14, 2018
…ythonGH-5246)

This happens in the NixOS build sandbox, for example, where the only
other user is nobody with home directory /.
(cherry picked from commit 5c0d462)

Co-authored-by: Anders Kaseorg <andersk@mit.edu>
@bedevere-bot
Copy link

GH-6792 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 14, 2018
…ythonGH-5246)

This happens in the NixOS build sandbox, for example, where the only
other user is nobody with home directory /.
(cherry picked from commit 5c0d462)

Co-authored-by: Anders Kaseorg <andersk@mit.edu>
@bedevere-bot
Copy link

GH-6793 is a backport of this pull request to the 3.6 branch.

@miss-islington
Copy link
Contributor

Sorry, @andersk and @serhiy-storchaka, I could not cleanly backport this to 2.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 5c0d462689e1a69537eaeba6ab94e3ff3524fc31 2.7

miss-islington added a commit that referenced this pull request May 14, 2018
…H-5246)

This happens in the NixOS build sandbox, for example, where the only
other user is nobody with home directory /.
(cherry picked from commit 5c0d462)

Co-authored-by: Anders Kaseorg <andersk@mit.edu>
@andersk
Copy link
Contributor Author

andersk commented May 14, 2018

There’s no pathlib in 2.7, so no 2.7 backport is needed.

miss-islington added a commit that referenced this pull request May 14, 2018
…H-5246)

This happens in the NixOS build sandbox, for example, where the only
other user is nobody with home directory /.
(cherry picked from commit 5c0d462)

Co-authored-by: Anders Kaseorg <andersk@mit.edu>
@serhiy-storchaka
Copy link
Member

Good point! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants