chiark / gitweb /
m.images: test with a file that has no EXIF data whatsoever.
authorVladimír Vondruš <mosra@centrum.cz>
Thu, 21 Dec 2017 22:46:16 +0000 (23:46 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Thu, 21 Dec 2017 22:49:36 +0000 (23:49 +0100)
Crashes. Wtf, I thought this is already handled.

pelican-plugins/m/test/images/noexif.jpg [new file with mode: 0644]
pelican-plugins/m/test/images/page.html
pelican-plugins/m/test/images/page.rst
pelican-plugins/m/test/test_images.py

diff --git a/pelican-plugins/m/test/images/noexif.jpg b/pelican-plugins/m/test/images/noexif.jpg
new file mode 100644 (file)
index 0000000..3d0805c
Binary files /dev/null and b/pelican-plugins/m/test/images/noexif.jpg differ
index 8f1b0722744706fbd5ef48a73074dfd5ca197f58..005d09cc7881a776ddd6f199d9261906980f2f63 100644 (file)
@@ -75,19 +75,25 @@ Yes.</span>
 </figure>
 </div>
 </div>
-<p>Image grid with a PNG file and a JPEG with sparse EXIF data:</p>
+<p>Image grid with a PNG file, JPEG with sparse EXIF data, JPEG with no EXIF data
+and long exposure (&gt;1 second):</p>
 <div class="m-imagegrid m-container-inflate">
 <div>
-<figure style="width: 54.545%">
+<figure style="width: 44.444%">
 <a href="./tiny.png"><img src="./tiny.png" /><div>
 </div>
 </a>
 </figure>
-<figure style="width: 22.727%">
+<figure style="width: 18.519%">
 <a href="./sparseexif.jpg"><img src="./sparseexif.jpg" /><figcaption>F2.8</figcaption>
 </a>
 </figure>
-<figure style="width: 22.727%">
+<figure style="width: 18.519%">
+<a href="./noexif.jpg"><img src="./noexif.jpg" /><div>
+</div>
+</a>
+</figure>
+<figure style="width: 18.519%">
 <a href="./longexposure.jpg"><img src="./longexposure.jpg" /><figcaption>1.5 s</figcaption>
 </a>
 </figure>
index 273d98381919517eec1151b058c4e03ce3401f00..3be7a03d8a51a817a3a42d1432517c4f9c9a69f7 100644 (file)
@@ -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
index 84725d60fe11f190c7ba86155a0f49dec252e397..61408b221ce6317f43278b5184839970db5b3691 100644 (file)
@@ -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']
         })
 
         #