Skip to content

Commit

Permalink
Fix DeprecationWarning: invalid escape sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Oct 2, 2018
1 parent 9c71095 commit 625e6f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tests/test_image_resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def test_subsample(self):

# 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):
Expand Down Expand Up @@ -496,7 +496,7 @@ def test_no_passthrough(self):
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:
Expand Down

0 comments on commit 625e6f5

Please sign in to comment.