summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pwd.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_pwd.py')
-rw-r--r--Lib/test/test_pwd.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_pwd.py b/Lib/test/test_pwd.py
index f8f1257..d217e05 100644
--- a/Lib/test/test_pwd.py
+++ b/Lib/test/test_pwd.py
@@ -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 = {}