Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
�gh-95376: Add test for names containing null (GH-GH-5394)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
(cherry picked from commit a17cd47)

Co-authored-by: Sion Kang <31057849+Yaminyam@users.noreply.github.com>
  • Loading branch information
Yaminyam authored and miss-islington committed Aug 6, 2022
commit f7d4362eaf3fc10b6b4db2001b70799980ddfdcd
2 changes: 2 additions & 0 deletions Lib/test/test_pwd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down