mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
gh-95376: Add test for names containing null (#GH-5394)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
This commit is contained in:
parent
4703c15811
commit
a17cd47b61
1 changed files with 2 additions and 0 deletions
|
@ -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 = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue