Skip to content

Simplified test code #8823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 21, 2025
Merged

Simplified test code #8823

merged 5 commits into from
Mar 21, 2025

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