Issue #20508: Improve exception message of IPv{4,6}Network.__getitem__

Patch by Gareth Rees.
This commit is contained in:
Berker Peksag 2016-06-11 22:30:05 +03:00
parent 24b102e6e8
commit 28dc1186a8
3 changed files with 6 additions and 2 deletions

View file

@ -1176,6 +1176,7 @@ class IpaddrUnitTest(unittest.TestCase):
self.assertEqual(str(self.ipv6_network[5]),
'2001:658:22a:cafe::5')
self.assertRaises(IndexError, self.ipv6_network.__getitem__, 1 << 64)
def testGetitem(self):
# http://code.google.com/p/ipaddr-py/issues/detail?id=15