File: ftfont_test.py

package info (click to toggle)
pygame 2.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 42,624 kB
  • sloc: ansic: 66,926; python: 48,742; javascript: 1,153; objc: 224; sh: 121; makefile: 59; cpp: 25
file content (17 lines) | stat: -rw-r--r-- 421 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import sys
import os
import unittest
from pygame.tests import font_test

import pygame.ftfont

font_test.pygame_font = pygame.ftfont

for name in dir(font_test):
    obj = getattr(font_test, name)
    if isinstance(obj, type) and issubclass(obj, unittest.TestCase):  # conditional and
        new_name = f"Ft{name}"
        globals()[new_name] = type(new_name, (obj,), {})

if __name__ == "__main__":
    unittest.main()