Skip to content

Conversation

@radarhere
Copy link
Member

Replace

f = str(tmp_path / "temp.png")

with

f = tmp_path / "temp.png"

where possible.

@hugovk
Copy link
Member

hugovk commented Mar 19, 2025

I guess most of these are fine, but are any of these actually testing it works with a string?

@radarhere
Copy link
Member Author

Almost all of these changes are about opening and saving. I've added an explicit test for opening and saving an image using a string.

An exception is a call to ImageFont.truetype(), but we already have other tests that pass strings to that -

return ImageFont.truetype(FONT_PATH, FONT_SIZE, layout_engine=layout_engine)

@hugovk hugovk merged commit 478ccb4 into python-pillow:main Mar 21, 2025
54 checks passed
@radarhere radarhere deleted the test_fp branch March 21, 2025 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants