summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ipaddress.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2015-01-18 15:22:47 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2015-01-18 15:22:47 (GMT)
commite6f250ed90d0efed83f9e3beef97e5f9e6398d00 (patch)
tree4eab1a386bb753827e51201a1d50feaa7710fad7 /Lib/test/test_ipaddress.py
parent82e07b92b330ec885968ca98fac5284c45037eac (diff)
downloadcpython-e6f250ed90d0efed83f9e3beef97e5f9e6398d00.zip
cpython-e6f250ed90d0efed83f9e3beef97e5f9e6398d00.tar.gz
cpython-e6f250ed90d0efed83f9e3beef97e5f9e6398d00.tar.bz2
Issue #23266: Much faster implementation of ipaddress.collapse_addresses() when there are many non-consecutive addresses.
Diffstat (limited to 'Lib/test/test_ipaddress.py')
-rw-r--r--Lib/test/test_ipaddress.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_ipaddress.py b/Lib/test/test_ipaddress.py
index c45e142..1fbd2d5 100644
--- a/Lib/test/test_ipaddress.py
+++ b/Lib/test/test_ipaddress.py
@@ -766,10 +766,11 @@ class IpaddrUnitTest(unittest.TestCase):
2 ** ipaddress.IPV6LENGTH)
def testInternals(self):
- first, last = ipaddress._find_address_range([
+ first, last, nitems = ipaddress._find_address_range([
ipaddress.IPv4Address('10.10.10.10'),
ipaddress.IPv4Address('10.10.10.12')])
self.assertEqual(first, last)
+ self.assertEqual(nitems, 1)
self.assertEqual(128, ipaddress._count_righthand_zero_bits(0, 128))
self.assertEqual("IPv4Network('1.2.3.0/24')", repr(self.ipv4_network))