[New-bugs-announce] [issue46150] test_pathlib assumes "fakeuser" does not exist as user

Thomas Wouters report at bugs.python.org
Wed Dec 22 07:58:48 EST 2021


New submission from Thomas Wouters <thomas at python.org>:

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.)

----------
components: Tests
messages: 409030
nosy: twouters
priority: normal
severity: normal
status: open
title: test_pathlib assumes "fakeuser" does not exist as user
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46150>
_______________________________________


More information about the New-bugs-announce mailing list