Skip to content

Commit

Permalink
Added underscores for readability
Browse files Browse the repository at this point in the history
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
  • Loading branch information
radarhere and hugovk committed Jun 30, 2023
1 parent 1fe1bb4 commit d398fed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions Tests/test_imagefont.py
Original file line number Diff line number Diff line change
Expand Up @@ -1040,21 +1040,21 @@ def test_render_mono_size():

def test_too_many_characters(font):
with pytest.raises(ValueError):
font.getlength("A" * 1000001)
font.getlength("A" * 1_000_001)
with pytest.raises(ValueError):
font.getbbox("A" * 1000001)
font.getbbox("A" * 1_000_001)
with pytest.raises(ValueError):
font.getmask2("A" * 1000001)
font.getmask2("A" * 1_000_001)

transposed_font = ImageFont.TransposedFont(font)
with pytest.raises(ValueError):
transposed_font.getlength("A" * 1000001)
transposed_font.getlength("A" * 1_000_001)

default_font = ImageFont.load_default()
with pytest.raises(ValueError):
default_font.getlength("A" * 1000001)
default_font.getlength("A" * 1_000_001)
with pytest.raises(ValueError):
default_font.getbbox("A" * 1000001)
default_font.getbbox("A" * 1_000_001)


@pytest.mark.parametrize(
Expand Down
2 changes: 1 addition & 1 deletion src/PIL/ImageFont.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Layout(IntEnum):
RAQM = 1


MAX_STRING_LENGTH = 1000000
MAX_STRING_LENGTH = 1_000_000


try:
Expand Down

0 comments on commit d398fed

Please sign in to comment.