From: Vladimír Vondruš Date: Thu, 21 Dec 2017 22:46:16 +0000 (+0100) Subject: m.images: test with a file that has no EXIF data whatsoever. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=e3136c33eaa9477a2eb6789a962f8a1c9e102415;p=blog.git m.images: test with a file that has no EXIF data whatsoever. Crashes. Wtf, I thought this is already handled. --- diff --git a/pelican-plugins/m/test/images/noexif.jpg b/pelican-plugins/m/test/images/noexif.jpg new file mode 100644 index 00000000..3d0805ca Binary files /dev/null and b/pelican-plugins/m/test/images/noexif.jpg differ diff --git a/pelican-plugins/m/test/images/page.html b/pelican-plugins/m/test/images/page.html index 8f1b0722..005d09cc 100644 --- a/pelican-plugins/m/test/images/page.html +++ b/pelican-plugins/m/test/images/page.html @@ -75,19 +75,25 @@ Yes. -

Image grid with a PNG file and a JPEG with sparse EXIF data:

+

Image grid with a PNG file, JPEG with sparse EXIF data, JPEG with no EXIF data +and long exposure (>1 second):

-
+
-
+
F2.8
-
+
+
+
+
+
+
1.5 s
diff --git a/pelican-plugins/m/test/images/page.rst b/pelican-plugins/m/test/images/page.rst index 273d9838..3be7a03d 100644 --- a/pelican-plugins/m/test/images/page.rst +++ b/pelican-plugins/m/test/images/page.rst @@ -57,10 +57,12 @@ Image grid: {filename}/flowers.jpg {filename}/ship.jpg -Image grid with a PNG file and a JPEG with sparse EXIF data: +Image grid with a PNG file, JPEG with sparse EXIF data, JPEG with no EXIF data +and long exposure (>1 second): .. image-grid:: {filename}/tiny.png {filename}/sparseexif.jpg + {filename}/noexif.jpg {filename}/longexposure.jpg diff --git a/pelican-plugins/m/test/test_images.py b/pelican-plugins/m/test/test_images.py index 84725d60..61408b22 100644 --- a/pelican-plugins/m/test/test_images.py +++ b/pelican-plugins/m/test/test_images.py @@ -31,7 +31,12 @@ class Images(PluginTestCase): def test(self): self.run_pelican({ 'PLUGINS': ['m.htmlsanity', 'm.images'], - 'STATIC_PATHS': ['tiny.png', 'ship.jpg', 'flowers.jpg', 'sparseexif.jpg', 'longexposure.jpg'] + 'STATIC_PATHS': ['tiny.png', + 'ship.jpg', + 'flowers.jpg', + 'sparseexif.jpg', + 'noexif.jpg', + 'longexposure.jpg'] }) #