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

Method testNetworkV6HashCollisions

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

Source from the content-addressed store, hash-verified

2843
2844 # issue 134062 Hash collisions in IPv4Network and IPv6Network
2845 def testNetworkV6HashCollisions(self):
2846 self.assertNotEqual(
2847 ipaddress.IPv6Network("fe80::/64").__hash__(),
2848 ipaddress.IPv6Network("fe80::ffff:ffff:ffff:0/112").__hash__()
2849 )
2850 self.assertNotEqual(
2851 ipaddress.IPv4Network("10.0.0.0/8").__hash__(),
2852 ipaddress.IPv6Network(
2853 "ffff:ffff:ffff:ffff:ffff:ffff:aff:0/112"
2854 ).__hash__()
2855 )
2856
2857
2858class TestModule(unittest.TestCase):

Callers

nothing calls this directly

Calls 2

assertNotEqualMethod · 0.80
__hash__Method · 0.45

Tested by

no test coverage detected