From: Giampaolo Rodola Date: Wed, 10 May 2017 18:13:20 +0000 (+0200) Subject: #30190: fix invalid escape sequence warnings (#1534) X-Git-Tag: v3.7.0a1~834 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c4750959acbfc3057f12aaec832483ba30898d1c;p=python #30190: fix invalid escape sequence warnings (#1534) --- diff --git a/Lib/unittest/test/test_assertions.py b/Lib/unittest/test/test_assertions.py index b046669e19..f5e64d68e7 100644 --- a/Lib/unittest/test/test_assertions.py +++ b/Lib/unittest/test/test_assertions.py @@ -225,9 +225,9 @@ class TestLongMessage(unittest.TestCase): def testAlmostEqual(self): self.assertMessages( 'assertAlmostEqual', (1, 2), - ["^1 != 2 within 7 places \(1 difference\)$", "^oops$", - "^1 != 2 within 7 places \(1 difference\)$", - "^1 != 2 within 7 places \(1 difference\) : oops$"]) + [r"^1 != 2 within 7 places \(1 difference\)$", "^oops$", + r"^1 != 2 within 7 places \(1 difference\)$", + r"^1 != 2 within 7 places \(1 difference\) : oops$"]) def testNotAlmostEqual(self): self.assertMessages('assertNotAlmostEqual', (1, 1),