summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_grp.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_grp.py b/Lib/test/test_grp.py
index c7ec03e..e52e17b 100644
--- a/Lib/test/test_grp.py
+++ b/Lib/test/test_grp.py
@@ -49,10 +49,12 @@ class GroupDatabaseTestCase(unittest.TestCase):
def test_errors(self):
self.assertRaises(TypeError, grp.getgrgid)
+ self.assertRaises(TypeError, grp.getgrgid, 3.14)
self.assertRaises(TypeError, grp.getgrnam)
+ self.assertRaises(TypeError, grp.getgrnam, 42)
self.assertRaises(TypeError, grp.getgrall, 42)
# embedded null character
- self.assertRaises(ValueError, grp.getgrnam, 'a\x00b')
+ self.assertRaisesRegex(ValueError, 'null', grp.getgrnam, 'a\x00b')
# try to get some errors
bynames = {}