From bab194b6f599bbec4c06421b24c31bdd2d13e694 Mon Sep 17 00:00:00 2001 From: Hugo Date: Tue, 2 Oct 2018 10:57:07 +0300 Subject: [PATCH] Fix DeprecationWarning: invalid escape sequence --- Tests/test_image_resample.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/test_image_resample.py b/Tests/test_image_resample.py index 1b7081d55..226e7873a 100644 --- a/Tests/test_image_resample.py +++ b/Tests/test_image_resample.py @@ -453,7 +453,7 @@ class CoreResampleBoxTest(PillowTestCase): # error with box should be much smaller than without self.assert_image_similar(reference, with_box, 6) - with self.assertRaisesRegex(AssertionError, "difference 29\."): + with self.assertRaisesRegex(AssertionError, r"difference 29\."): self.assert_image_similar(reference, without_box, 5) def test_formats(self): @@ -496,7 +496,7 @@ class CoreResampleBoxTest(PillowTestCase): try: res = im.resize(size, Image.LANCZOS, box) self.assertEqual(res.size, size) - with self.assertRaisesRegex(AssertionError, "difference \d"): + with self.assertRaisesRegex(AssertionError, r"difference \d"): # check that the difference at least that much self.assert_image_similar(res, im.crop(box), 20) except AssertionError: