Skip to content

Commit

Permalink
User shorter variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Jul 31, 2023
1 parent a06e745 commit 97bd01c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Lib/test/test_ipaddress.py
Original file line number Diff line number Diff line change
Expand Up @@ -1325,13 +1325,13 @@ def testIPv6IPv4MappedStringRepresentation(self):
long_prefix = '0000:0000:0000:0000:0000:ffff:'
ipv4 = '1.2.3.4'
for short_prefix in ('::ffff:', '::'):
ipv6_ipv4_mapped_str = '%s%s' % (short_prefix, ipv4)
with self.subTest(addr=ipv6_ipv4_mapped_str):
ipv6_ipv4_mapped_address = ipaddress.IPv6Address(ipv6_ipv4_mapped_str)
ipv6_ipv4_mapped_interface = ipaddress.IPv6Interface(ipv6_ipv4_mapped_str)
self.assertEqual(str(ipv6_ipv4_mapped_address), ipv6_ipv4_mapped_str)
self.assertEqual(ipv6_ipv4_mapped_address.exploded, long_prefix + ipv4)
self.assertEqual(str(ipv6_ipv4_mapped_interface.ip), ipv6_ipv4_mapped_str)
ipv6_ipv4_str = '%s%s' % (short_prefix, ipv4)
with self.subTest(addr=ipv6_ipv4_str):
ipv6_ipv4_addr = ipaddress.IPv6Address(ipv6_ipv4_str)
ipv6_ipv4_iface = ipaddress.IPv6Interface(ipv6_ipv4_str)
self.assertEqual(str(ipv6_ipv4_addr), ipv6_ipv4_str)
self.assertEqual(ipv6_ipv4_addr.exploded, long_prefix + ipv4)
self.assertEqual(str(ipv6_ipv4_iface.ip), ipv6_ipv4_str)

def testGetScopeId(self):
self.assertEqual(self.ipv6_address.scope_id,
Expand Down

0 comments on commit 97bd01c

Please # to comment.