Skip to content

Commit

Permalink
Merge pull request #2383 from pygame-community/ankith26-freetype-ci
Browse files Browse the repository at this point in the history
[BACKPORT OF #2370] Try getting freetype tests running on CI, fix minor test fail issues
  • Loading branch information
ankith26 authored Aug 5, 2023
2 parents 3928b99 + 2cd43ec commit 9a5ac27
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions test/freetype_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import os

if os.environ.get("SDL_VIDEODRIVER") == "dummy":
__tags__ = ("ignore", "subprocess_ignore")

import unittest
import ctypes
import weakref
Expand Down Expand Up @@ -547,8 +544,7 @@ def test_freetype_Font_name(self):
f = self._TEST_FONTS["fixed"]
self.assertEqual(f.name, "Inconsolata")

nf = nullfont()
self.assertEqual(nf.name, repr(nf))
self.assertRaises(AttributeError, lambda: nullfont().name)

def test_freetype_Font_size(self):
f = ft.Font(None, size=12)
Expand Down Expand Up @@ -1693,7 +1689,7 @@ def test_freetype_SysFont_name(self):
self.assertEqual(font_name_2, font_name)

# Check mixed list of bytes and string.
names = [fonts[0], fonts_b[1], fonts[2], fonts_b[3]]
names = [fonts_b[i] if i % 2 else str_font for i, str_font in enumerate(fonts)]
font_name_2 = ft.SysFont(names, size).name
self.assertEqual(font_name_2, font_name)

Expand Down

0 comments on commit 9a5ac27

Please sign in to comment.