diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-08-06 17:30:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-06 17:30:29 (GMT) |
commit | 9278fc4e27d7b4bad03cb0976fff80828b149ed2 (patch) | |
tree | 8f795fd9a05471c3dcbbbb2c7569513c020f3442 /Lib | |
parent | 32b71ffbdbf6223ec0ce4dedf9b99e26b9c9730c (diff) | |
download | cpython-9278fc4e27d7b4bad03cb0976fff80828b149ed2.zip cpython-9278fc4e27d7b4bad03cb0976fff80828b149ed2.tar.gz cpython-9278fc4e27d7b4bad03cb0976fff80828b149ed2.tar.bz2 |
gh-95395: Add argument type error test (GH-95412) (GH-95745)
(cherry picked from commit 4703c158116bd157e20938bbf5356b79422470bb)
Co-authored-by: Sion Kang <31057849+Yaminyam@users.noreply.github.com>
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_grp.py | 4 |
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 = {} |