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

test_pathlib assumes "fakeuser" does not exist as user #90308

Closed
Yhg1s opened this issue Dec 22, 2021 · 4 comments
Closed

test_pathlib assumes "fakeuser" does not exist as user #90308

Yhg1s opened this issue Dec 22, 2021 · 4 comments
Assignees
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes tests Tests in the Lib/test dir

Comments

@Yhg1s
Copy link
Member

Yhg1s commented Dec 22, 2021

BPO 46150
Nosy @Yhg1s, @gpshead, @miss-islington, @sobolevn
PRs
  • bpo-46150: ensure fakename does not exist in PosixPathTest.test_expanduser #30240
  • bpo-46150: Allow test_pathlib to pass on systems where fakeuser exists. #30244
  • [3.10] bpo-46150: ensure fakeuser does not exist in PosixPathTest.test_expanduser (GH-30240) #30248
  • [3.9] bpo-46150: ensure fakeuser does not exist in PosixPathTest.test_expanduser (GH-30240) #30249
  • [3.9] bpo-46150: ensure fakeuser does not exist in PosixPathTest.test_expanduser (GH-30240) #30249
  • [3.9] bpo-46150: ensure fakeuser does not exist in PosixPathTest.test_expanduser (GH-30240) #30249
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/gpshead'
    closed_at = <Date 2021-12-27.18:37:51.941>
    created_at = <Date 2021-12-22.12:58:48.118>
    labels = ['tests', '3.9', '3.10', '3.11']
    title = 'test_pathlib assumes "fakeuser" does not exist as user'
    updated_at = <Date 2021-12-27.18:37:51.940>
    user = 'https://github.com/Yhg1s'

    bugs.python.org fields:

    activity = <Date 2021-12-27.18:37:51.940>
    actor = 'gregory.p.smith'
    assignee = 'gregory.p.smith'
    closed = True
    closed_date = <Date 2021-12-27.18:37:51.941>
    closer = 'gregory.p.smith'
    components = ['Tests']
    creation = <Date 2021-12-22.12:58:48.118>
    creator = 'twouters'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 46150
    keywords = ['patch']
    message_count = 4.0
    messages = ['409030', '409128', '409130', '409131']
    nosy_count = 4.0
    nosy_names = ['twouters', 'gregory.p.smith', 'miss-islington', 'sobolevn']
    pr_nums = ['30240', '30244', '30248', '30249', '30249', '30249']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue46150'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @Yhg1s
    Copy link
    Member Author

    Yhg1s commented Dec 22, 2021

    test_pathlib contains, in PosixPathTest.test_expanduser, a check that expanduser on a nonexistent user will raise RuntimeError. Leaving aside the question why that's a RuntimeError (which is probably too late to fix anyway), the test performs this check by assuming 'fakeuser' is a nonexistent user. This test will fail when such a user does exist. (The test already uses the pwd module for other reasons, so it certainly could check that first.)

    @Yhg1s Yhg1s added 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes tests Tests in the Lib/test dir labels Dec 22, 2021
    @gpshead
    Copy link
    Member

    gpshead commented Dec 24, 2021

    New changeset b8de8b7 by Nikita Sobolev in branch 'main':
    bpo-46150: ensure fakeuser does not exist in PosixPathTest.test_expanduser (GH-30240)
    b8de8b7

    @miss-islington
    Copy link
    Contributor

    New changeset 8005e22 by Miss Islington (bot) in branch '3.10':
    bpo-46150: ensure fakeuser does not exist in PosixPathTest.test_expanduser (GH-30240)
    8005e22

    @miss-islington
    Copy link
    Contributor

    New changeset d718764 by Miss Islington (bot) in branch '3.9':
    bpo-46150: ensure fakeuser does not exist in PosixPathTest.test_expanduser (GH-30240)
    d718764

    @gpshead gpshead closed this as completed Dec 27, 2021
    @gpshead gpshead closed this as completed Dec 27, 2021
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes 3.10 only security fixes 3.11 only security fixes tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants