File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -1323,15 +1323,14 @@ def testGetIp(self):
13231323
13241324 def testIPv6IPv4MappedStringRepresentation (self ):
13251325 long_prefix = '0000:0000:0000:0000:0000:ffff:'
1326+ short_prefix = '::ffff:'
13261327 ipv4 = '1.2.3.4'
1327- for short_prefix in ('::ffff:' , '::' ):
1328- ipv6_ipv4_str = '%s%s' % (short_prefix , ipv4 )
1329- with self .subTest (addr = ipv6_ipv4_str ):
1330- ipv6_ipv4_addr = ipaddress .IPv6Address (ipv6_ipv4_str )
1331- ipv6_ipv4_iface = ipaddress .IPv6Interface (ipv6_ipv4_str )
1332- self .assertEqual (str (ipv6_ipv4_addr ), ipv6_ipv4_str )
1333- self .assertEqual (ipv6_ipv4_addr .exploded , long_prefix + ipv4 )
1334- self .assertEqual (str (ipv6_ipv4_iface .ip ), ipv6_ipv4_str )
1328+ ipv6_ipv4_str = short_prefix + ipv4
1329+ ipv6_ipv4_addr = ipaddress .IPv6Address (ipv6_ipv4_str )
1330+ ipv6_ipv4_iface = ipaddress .IPv6Interface (ipv6_ipv4_str )
1331+ self .assertEqual (str (ipv6_ipv4_addr ), ipv6_ipv4_str )
1332+ self .assertEqual (ipv6_ipv4_addr .exploded , long_prefix + ipv4 )
1333+ self .assertEqual (str (ipv6_ipv4_iface .ip ), ipv6_ipv4_str )
13351334
13361335 def testGetScopeId (self ):
13371336 self .assertEqual (self .ipv6_address .scope_id ,
You can’t perform that action at this time.
0 commit comments