File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -2623,6 +2623,16 @@ def testsixtofour(self):
26232623 sixtofouraddr .sixtofour )
26242624 self .assertFalse (bad_addr .sixtofour )
26252625
2626+ def testipv4_translation (self ):
2627+ embedded_rfc6052 = ipaddress .ip_address ('64:ff9b::172.29.45.100' )
2628+ embedded_rfc8215 = ipaddress .ip_address ('64:ff9b:1::172.29.45.100' )
2629+ bad_addr = ipaddress .ip_address ('2001:db8::172.29.45.100' )
2630+ self .assertEqual (ipaddress .IPv4Address ('172.29.45.100' ),
2631+ embedded_rfc6052 .ipv4_translation )
2632+ self .assertEqual (ipaddress .IPv4Address ('172.29.45.100' ),
2633+ embedded_rfc8215 .ipv4_translation )
2634+ self .assertFalse (bad_addr .ipv4_translation )
2635+
26262636 # issue41004 Hash collisions in IPv4Interface and IPv6Interface
26272637 def testV4HashIsNotConstant (self ):
26282638 ipv4_address1 = ipaddress .IPv4Interface ("1.2.3.4" )
You can’t perform that action at this time.
0 commit comments