mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 10:46:16 +03:00
Sort extensions alphabetically in error message
This commit is contained in:
parent
e14072e973
commit
dbe979d032
|
@ -469,7 +469,7 @@ def test_load_when_image_not_found(tmp_path: Path) -> None:
|
||||||
ImageFont.load(tempfile)
|
ImageFont.load(tempfile)
|
||||||
|
|
||||||
root = os.path.splitext(tempfile)[0]
|
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:
|
def test_load_path_not_found() -> None:
|
||||||
|
|
|
@ -115,7 +115,7 @@ class ImageFont:
|
||||||
if image:
|
if image:
|
||||||
image.close()
|
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)
|
raise OSError(msg)
|
||||||
|
|
||||||
self.file = fullname
|
self.file = fullname
|
||||||
|
|
Loading…
Reference in New Issue
Block a user