diff --git a/tests/test_gallery.py b/tests/test_gallery.py index 493e7be..eba577b 100644 --- a/tests/test_gallery.py +++ b/tests/test_gallery.py @@ -119,7 +119,12 @@ def test_video(settings, tmpdir): @pytest.mark.parametrize("path,album", REF.items()) def test_album(path, album, settings, tmpdir): - locale.setlocale(locale.LC_ALL, 'fr_FR') + # store current locale + old_locale = locale.setlocale(locale.LC_ALL) + + # locale.setlocale(locale.LC_ALL, 'fr_FR') + locale.setlocale(locale.LC_ALL, 'fr_FR.UTF-8') + gal = Gallery(settings, ncpu=1) a = Album(path, settings, album['subdirs'], album['medias'], gal) @@ -130,6 +135,9 @@ def test_album(path, album, settings, tmpdir): assert [m.filename for m in a.medias] == album['medias'] assert len(a) == len(album['medias']) + # restore locale back + locale.setlocale(locale.LC_ALL, old_locale) + def test_album_medias(settings): gal = Gallery(settings, ncpu=1)