Sort extensions alphabetically in error message

This commit is contained in:
Andrew Murray 2024-09-07 19:09:01 +10:00
parent e14072e973
commit dbe979d032
2 changed files with 2 additions and 2 deletions

View File

@ -469,7 +469,7 @@ def test_load_when_image_not_found(tmp_path: Path) -> None:
ImageFont.load(tempfile)
root = os.path.splitext(tempfile)[0]
assert str(e.value) == f"cannot find glyph data file {root}.{{png|gif|pbm}}"
assert str(e.value) == f"cannot find glyph data file {root}.{{gif|pbm|png}}"
def test_load_path_not_found() -> None:

View File

@ -115,7 +115,7 @@ class ImageFont:
if image:
image.close()
msg = f"cannot find glyph data file {root}.{{png|gif|pbm}}"
msg = f"cannot find glyph data file {root}.{{gif|pbm|png}}"
raise OSError(msg)
self.file = fullname