aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2019-10-18 02:46:39 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2019-10-18 02:46:39 +0200
commit77f17736fef94e6a1160aa54017de7b397f384cd (patch)
tree15582b162ab9be5908963a66ed4f6c7f6e8c6a8e
parent0a2411340c9ddf193477ee9b26aebf4c6d13f65b (diff)
parentaf2006e348c7c69b72e178f1134ecdc08db98b10 (diff)
downloadipaddress-77f17736fef94e6a1160aa54017de7b397f384cd.tar.gz
Merge commit af2006e from @chrahunt, to fix invalid escape sequences
-rw-r--r--test_ipaddress.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test_ipaddress.py b/test_ipaddress.py
index 3705ca8..37d4990 100644
--- a/test_ipaddress.py
+++ b/test_ipaddress.py
@@ -862,9 +862,9 @@ class IpaddrUnitTest(unittest.TestCase):
self.ipv6_network = ipaddress.IPv6Network('2001:658:22a:cafe::/64')
def testRepr(self):
- self.assertTrue(re.match("IPv4Interface\(u?'1.2.3.4/32'\)",
+ self.assertTrue(re.match(r"IPv4Interface\(u?'1.2.3.4/32'\)",
repr(ipaddress.IPv4Interface('1.2.3.4'))))
- self.assertTrue(re.match("IPv6Interface\(u?'::1/128'\)",
+ self.assertTrue(re.match(r"IPv6Interface\(u?'::1/128'\)",
repr(ipaddress.IPv6Interface('::1'))))
# issue #16531: constructing IPv4Network from an (address, mask) tuple
@@ -1014,7 +1014,8 @@ class IpaddrUnitTest(unittest.TestCase):
[(ip1, ip3)])
self.assertEqual(128, ipaddress._count_righthand_zero_bits(0, 128))
self.assertTrue(
- re.match("IPv4Network\(u?'1.2.3.0/24'\)", repr(self.ipv4_network)))
+ re.match(r"IPv4Network\(u?'1.2.3.0/24'\)",
+ repr(self.ipv4_network)))
def testMissingAddressVersion(self):
class Broken(ipaddress._BaseAddress):