From cd297893522ce869ade43b3b20a86ab0599bbadd Mon Sep 17 00:00:00 2001 From: Simon Conseil Date: Sun, 14 Jul 2024 19:59:10 +0200 Subject: [PATCH] Fix tests --- tests/test_gallery.py | 8 ++++++-- tests/test_utils.py | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/test_gallery.py b/tests/test_gallery.py index e33e017..cf6978c 100644 --- a/tests/test_gallery.py +++ b/tests/test_gallery.py @@ -94,7 +94,9 @@ def test_media(settings): assert m.thumb_name == thumb assert m.thumb_path == join(settings["destination"], path, thumb) assert m.title == "Foo Bar" - assert m.description == "

This is a funny description of this image

" + assert m.description.startswith( + "

This is a funny description of this image

" + ) assert repr(m) == f"('{file_path}')" assert str(m) == file_path @@ -153,7 +155,9 @@ def test_media_img_format(settings): assert m.thumb_name == thumb assert m.thumb_path == join(settings["destination"], path, thumb) assert m.title == "Foo Bar" - assert m.description == "

This is a funny description of this image

" + assert m.description.startswith( + "

This is a funny description of this image

" + ) file_path = join(path, "11.tiff") assert repr(m) == f"('{file_path}')" diff --git a/tests/test_utils.py b/tests/test_utils.py index b404dd6..317e7f9 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -103,7 +103,9 @@ def test_read_markdown(): m = utils.read_markdown(src) assert m["title"] == "Foo Bar" assert m["meta"]["location"][0] == "Bavaria" - assert m["description"] == "

This is a funny description of this image

" + assert m["description"].startswith( + "

This is a funny description of this image

" + ) def test_read_markdown_empty_file(tmpdir):