Skip to content
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

Fix ftfont_test being run directly #2763

Merged
merged 2 commits into from
Mar 28, 2024

Conversation

Starbuck5
Copy link
Member

ftfont_test uses font_test to run, but it was trying to import pygame.freetype for a version check without an explicit import (which pygame.freetype needs). Removed the dependency on pygame.freetype for the ftfont path.

I ran into this while I was trying to get the old multithreaded test runner working, which runs each test in individual processes. This failed under those conditions. Normally something else imports pygame.freetype first so it's in working order by the time it gets here.

@Starbuck5 Starbuck5 requested a review from a team as a code owner March 21, 2024 08:07
@Starbuck5 Starbuck5 added the Code quality/robustness Code quality and resilience to changes label Mar 21, 2024
@Starbuck5 Starbuck5 marked this pull request as draft March 21, 2024 08:26
ftfont_test uses font_test to run, but it was trying to import pygame.freetype for a version check without an explicit import (which pygame.freetype needs). Removed the dependency on pygame.freetype for the ftfont path.
@Starbuck5 Starbuck5 marked this pull request as ready for review March 22, 2024 07:16
@Starbuck5 Starbuck5 added the ftfont pygame.ftfont label Mar 22, 2024
Copy link
Member

@oddbookworm oddbookworm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any issues, so LGTM

Copy link
Member

@ankith26 ankith26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a couple of nitpicks, but apart from those this PR LGTM! 🍰

test/font_test.py Outdated Show resolved Hide resolved
test/font_test.py Outdated Show resolved Hide resolved
@Starbuck5 Starbuck5 merged commit 98fc54d into pygame-community:main Mar 28, 2024
29 checks passed
@Starbuck5 Starbuck5 added this to the 2.5.0 milestone Mar 28, 2024
@Starbuck5 Starbuck5 deleted the fix-ftfont-test branch March 28, 2024 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code quality/robustness Code quality and resilience to changes ftfont pygame.ftfont
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants