summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_grp.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2020-05-26 15:43:38 (GMT)
committerGitHub <noreply@github.com>2020-05-26 15:43:38 (GMT)
commit578c3955e0222ec7b3146197467fbb0fcfae12fe (patch)
tree1314ca1eb6153feaf3fb1cae341784270ce24c32 /Lib/test/test_grp.py
parent8ad052464a4e0aef9a11663b80f187087b773592 (diff)
downloadcpython-578c3955e0222ec7b3146197467fbb0fcfae12fe.zip
cpython-578c3955e0222ec7b3146197467fbb0fcfae12fe.tar.gz
cpython-578c3955e0222ec7b3146197467fbb0fcfae12fe.tar.bz2
bpo-37999: No longer use __int__ in implicit integer conversions. (GH-15636)
Only __index__ should be used to make integer conversions lossless.
Diffstat (limited to 'Lib/test/test_grp.py')
-rw-r--r--Lib/test/test_grp.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_grp.py b/Lib/test/test_grp.py
index e511947..0993f09 100644
--- a/Lib/test/test_grp.py
+++ b/Lib/test/test_grp.py
@@ -100,8 +100,8 @@ class GroupDatabaseTestCase(unittest.TestCase):
self.skipTest('no groups')
# Choose an existent gid.
gid = entries[0][2]
- self.assertWarns(DeprecationWarning, grp.getgrgid, float(gid))
- self.assertWarns(DeprecationWarning, grp.getgrgid, str(gid))
+ self.assertRaises(TypeError, grp.getgrgid, float(gid))
+ self.assertRaises(TypeError, grp.getgrgid, str(gid))
if __name__ == "__main__":