mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-15 02:32:29 +03:00
Fix DeprecationWarning: invalid escape sequence
This commit is contained in:
parent
a3b0659790
commit
bab194b6f5
|
@ -453,7 +453,7 @@ class CoreResampleBoxTest(PillowTestCase):
|
||||||
|
|
||||||
# error with box should be much smaller than without
|
# error with box should be much smaller than without
|
||||||
self.assert_image_similar(reference, with_box, 6)
|
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)
|
self.assert_image_similar(reference, without_box, 5)
|
||||||
|
|
||||||
def test_formats(self):
|
def test_formats(self):
|
||||||
|
@ -496,7 +496,7 @@ class CoreResampleBoxTest(PillowTestCase):
|
||||||
try:
|
try:
|
||||||
res = im.resize(size, Image.LANCZOS, box)
|
res = im.resize(size, Image.LANCZOS, box)
|
||||||
self.assertEqual(res.size, size)
|
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
|
# check that the difference at least that much
|
||||||
self.assert_image_similar(res, im.crop(box), 20)
|
self.assert_image_similar(res, im.crop(box), 20)
|
||||||
except AssertionError:
|
except AssertionError:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user