-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Conversation
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! |
cd25992
to
bcb2b2a
Compare
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? |
Lib/test/test_pathlib.py
Outdated
@@ -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 != /') |
There was a problem hiding this comment.
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
.
There was a problem hiding this 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.
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 |
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>
I have made the requested changes; please review again. |
Thanks for making the requested changes! @serhiy-storchaka: please review the changes made to this pull request. |
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. |
…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>
GH-6792 is a backport of this pull request to the 3.7 branch. |
…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>
GH-6793 is a backport of this pull request to the 3.6 branch. |
Sorry, @andersk and @serhiy-storchaka, I could not cleanly backport this to |
There’s no |
Good point! 😄 |
This happens in the NixOS build sandbox, for example, where the only other user is nobody with home directory /.
https://bugs.python.org/issue32601