Browse Source

Format

pull/464/head
Simon Conseil 4 years ago
parent
commit
3fef17e3fc
  1. 2
      docs/changelog.rst
  2. 2
      sigal/utils.py
  3. 11
      tests/test_extended_caching.py
  4. 2
      tests/test_image.py

2
docs/changelog.rst

@ -23,7 +23,7 @@ Sigal now requires Python 3.8+.
the galleria theme [:issue:`450`].
- Fix loading ``filters.py`` [:issue:`452`].
- Fix compatibility with Click 8.1.
- colorbox theme: avoiding holes due to non image/video files present in the
- colorbox theme: avoiding holes due to non image/video files present in the
source directory [:issue:`455`].
- Extend caching plugin to handle markdown and iptc metadata [:issue:`443`].

2
sigal/utils.py

@ -18,9 +18,9 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
from functools import lru_cache
import os
import shutil
from functools import lru_cache
from urllib.parse import quote
from markdown import Markdown

11
tests/test_extended_caching.py

@ -109,10 +109,17 @@ def test_load_metadata_missing(settings, tmpdir):
# set mod_date to -1 to force cache update
gal.metadataCache = {
"exifTest/_index": {"mod_date": -1,},
"exifTest/_index": {
"mod_date": -1,
},
"exifTest/21.jpg": {"exif": "Foo", "mod_date": -1},
"exifTest/foooo.jpg": {"exif": "Foo"},
"dir1/test2/22.jpg": {"exif": "Bar", "mod_date": 100000000000, "meta_mod_date": -1, "markdown_metadata": "Bar"},
"dir1/test2/22.jpg": {
"exif": "Bar",
"mod_date": 100000000000,
"meta_mod_date": -1,
"markdown_metadata": "Bar",
},
}
# errors should all be caught
extended_caching.load_metadata(gal.albums["exifTest"])

2
tests/test_image.py

@ -11,8 +11,8 @@ from sigal.image import (
generate_thumbnail,
get_exif_data,
get_exif_tags,
get_iptc_data,
get_image_metadata,
get_iptc_data,
get_size,
process_image,
)

Loading…
Cancel
Save