From a8f53c4b03c28e36902220672f3066fc4cb26908 Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Sun, 8 Feb 2015 13:40:35 +0000 Subject: [PATCH] Added a failing test for #968 --- wagtail/wagtailimages/tests/test_image_operations.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wagtail/wagtailimages/tests/test_image_operations.py b/wagtail/wagtailimages/tests/test_image_operations.py index f4dce9642..38d6be06c 100644 --- a/wagtail/wagtailimages/tests/test_image_operations.py +++ b/wagtail/wagtailimages/tests/test_image_operations.py @@ -151,6 +151,13 @@ class TestFillOperation(ImageOperationTestCase): ('resize', (800, 600), {}), ]), + # Basic usage with an oddly-sized original image + # This checks for a rounding precision issue (#968) + ('fill-200x200', Image(width=539, height=720), [ + ('crop', (0, 90, 539, 629), {}), + ('resize', (200, 200), {}), + ]), + # Closeness shouldn't have any effect when used without a focal point ('fill-800x600-c100', Image(width=1000, height=1000), [ ('crop', (0, 125, 1000, 875), {}),