summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ipaddress.py
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2012-08-05 12:02:18 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2012-08-05 12:02:18 (GMT)
commit730f67f2fa2d1df828a93301e4df48f1f1c41b2b (patch)
tree6ecc84e9845eea17534e26ba6d321f2395c6d56c /Lib/test/test_ipaddress.py
parentd9baa8592cd26e2fd2689d3eeda6e5f7fd3e21a8 (diff)
downloadcpython-730f67f2fa2d1df828a93301e4df48f1f1c41b2b.zip
cpython-730f67f2fa2d1df828a93301e4df48f1f1c41b2b.tar.gz
cpython-730f67f2fa2d1df828a93301e4df48f1f1c41b2b.tar.bz2
Issue 14814: Docs work showed some more cases of networks pretending to be addresses and highlighted the weird approach to implementing the 'is_whatever' properties. Impl now illustrates far more clearly that networks have a property if both their network and broadcast addresses have that property
Diffstat (limited to 'Lib/test/test_ipaddress.py')
-rw-r--r--Lib/test/test_ipaddress.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_ipaddress.py b/Lib/test/test_ipaddress.py
index a44fa7f..061c866 100644
--- a/Lib/test/test_ipaddress.py
+++ b/Lib/test/test_ipaddress.py
@@ -647,8 +647,8 @@ class IpaddrUnitTest(unittest.TestCase):
ipv4 = ipaddress.ip_network('1.2.3.4')
ipv6 = ipaddress.ip_network('2001:658:22a:cafe:200:0:0:1')
- self.assertEqual(ipv4, ipaddress.ip_network(int(ipv4)))
- self.assertEqual(ipv6, ipaddress.ip_network(int(ipv6)))
+ self.assertEqual(ipv4, ipaddress.ip_network(int(ipv4.network_address)))
+ self.assertEqual(ipv6, ipaddress.ip_network(int(ipv6.network_address)))
v6_int = 42540616829182469433547762482097946625
self.assertEqual(self.ipv6_interface._ip,