mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
update test from test_pwd cPython 3.11.2
This commit is contained in:
1 parent
92b1a5bf3e
commit
999925744c
1 file changed
+3
-1
Vendored
+3
-1
@@ -59,6 +59,8 @@ class PwdTest(unittest.TestCase):
|
||||
self.assertRaises(TypeError, pwd.getpwnam)
|
||||
self.assertRaises(TypeError, pwd.getpwnam, 42)
|
||||
self.assertRaises(TypeError, pwd.getpwall, 42)
|
||||
# embedded null character
|
||||
self.assertRaisesRegex(ValueError, 'null', pwd.getpwnam, 'a\x00b')
|
||||
|
||||
# try to get some errors
|
||||
bynames = {}
|
||||
@@ -69,7 +71,7 @@ class PwdTest(unittest.TestCase):
|
||||
|
||||
allnames = list(bynames.keys())
|
||||
namei = 0
|
||||
fakename = allnames[namei]
|
||||
fakename = allnames[namei] if allnames else "invaliduser"
|
||||
while fakename in bynames:
|
||||
chars = list(fakename)
|
||||
for i in range(len(chars)):
|
||||
|
||||
Reference in new issue
Block a user