Skip to content

Commit

Permalink
tests fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
itzpr3d4t0r committed Jan 5, 2025
1 parent 6ce4df5 commit 824caa9
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions test/font_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,10 @@ def test_get_linesize(self):
self.assertTrue(isinstance(linesize, int))
self.assertTrue(linesize > 0)

@unittest.skipIf(
pygame.font.get_sdl_ttf_version() < (2, 24, 0),
"supported in SDL_ttf 2.24.0 onwards",
)
def test_set_linesize(self):
f = pygame_font.Font(None, 20)
linesize = f.get_linesize()
Expand Down Expand Up @@ -917,18 +921,18 @@ def test_font_method_should_raise_exception_after_quit(self):
skip_methods = set()
version = pygame.font.get_sdl_ttf_version()
if version >= (2, 0, 18):
if version >= (2, 24, 0):
methods.append(("set_linesize", (2,)))
else:
skip_methods.add("set_linesize")

methods.append(("get_point_size", ()))
methods.append(("set_point_size", (34,)))
else:
skip_methods.add("get_point_size")
skip_methods.add("set_point_size")
skip_methods.add("point_size")

if version >= (2, 24, 0):
methods.append(("set_linesize", (2,)))
else:
skip_methods.add("set_linesize")

if version < (2, 20, 0):
skip_methods.add("align")

Expand Down

0 comments on commit 824caa9

Please sign in to comment.