mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-95376: Add test for names containing null (GH-GH-5394) (GH-95747)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
(cherry picked from commit a17cd47b61)
Co-authored-by: Sion Kang <31057849+Yaminyam@users.noreply.github.com>
This commit is contained in:
parent
9278fc4e27
commit
f05a0f48e8
1 changed files with 2 additions and 0 deletions
|
|
@ -59,6 +59,8 @@ def test_errors(self):
|
|||
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