MCPcopy Index your code
hub / github.com/python/cpython / testNetworkV4HashCollisions

Method testNetworkV4HashCollisions

Lib/test/test_ipaddress.py:2830–2842  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2828
2829 # issue 134062 Hash collisions in IPv4Network and IPv6Network
2830 def testNetworkV4HashCollisions(self):
2831 self.assertNotEqual(
2832 ipaddress.IPv4Network("192.168.1.255/32").__hash__(),
2833 ipaddress.IPv4Network("192.168.1.0/24").__hash__()
2834 )
2835 self.assertNotEqual(
2836 ipaddress.IPv4Network("172.24.255.0/24").__hash__(),
2837 ipaddress.IPv4Network("172.24.0.0/16").__hash__()
2838 )
2839 self.assertNotEqual(
2840 ipaddress.IPv4Network("192.168.1.87/32").__hash__(),
2841 ipaddress.IPv4Network("192.168.1.86/31").__hash__()
2842 )
2843
2844 # issue 134062 Hash collisions in IPv4Network and IPv6Network
2845 def testNetworkV6HashCollisions(self):

Callers

nothing calls this directly

Calls 2

assertNotEqualMethod · 0.80
__hash__Method · 0.45

Tested by

no test coverage detected