Skip to content

Commit

Permalink
gh-95376: Add test for names containing null (GH-GH-5394) (GH-95747)
Browse files Browse the repository at this point in the history
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
miss-islington and Yaminyam authored Aug 6, 2022
1 parent 9278fc4 commit f05a0f4
Showing 1 changed file with 2 additions and 0 deletions.
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

0 comments on commit f05a0f4

Please sign in to comment.