From 9f808fa0e43ae903d6159848d1331dcccb91434d Mon Sep 17 00:00:00 2001 From: Viljami Ilola <+@hix.fi> Date: Sun, 21 Apr 2024 00:03:22 +0300 Subject: fonts as object --- tests/test_enemies.py | 6 +++--- tests/test_player.py | 4 ++-- tests/test_screens.py | 4 ++-- tests/test_text.py | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'tests') diff --git a/tests/test_enemies.py b/tests/test_enemies.py index c77faea..0ba2f53 100644 --- a/tests/test_enemies.py +++ b/tests/test_enemies.py @@ -7,11 +7,11 @@ from pathlib import Path from sliceitoff.enemies.enemies import EnemyBall, Enemies from sliceitoff.display import Scaling -from sliceitoff.text import Fonts +from sliceitoff.text import fonts class TestEnemyBall(unittest.TestCase): def setUp(self): - Fonts.load_fonts( Path(__file__).parent.parent.resolve() + fonts.init( Path(__file__).parent.parent.resolve() .joinpath('src').joinpath('sliceitoff').joinpath('assets')) def test_can_create(self): @@ -21,7 +21,7 @@ class TestEnemyBall(unittest.TestCase): class TestEnemies(unittest.TestCase): def setUp(self): Scaling.update_scaling((640,400)) - Fonts.load_fonts( Path(__file__).parent.parent.resolve() + fonts.init( Path(__file__).parent.parent.resolve() .joinpath('src').joinpath('sliceitoff').joinpath('assets')) def test_can_create(self): diff --git a/tests/test_player.py b/tests/test_player.py index bf3647a..82da106 100644 --- a/tests/test_player.py +++ b/tests/test_player.py @@ -7,7 +7,7 @@ import unittest import pygame from sliceitoff.player import Player, Life -from sliceitoff.text import Fonts +from sliceitoff.text import fonts from sliceitoff.display import Scaling class TestPlayer(unittest.TestCase): @@ -31,7 +31,7 @@ class TestPlayer(unittest.TestCase): class TestLife(unittest.TestCase): def setUp(self): Scaling.update_scaling((640,480)) - Fonts.load_fonts( Path(__file__).parent.parent.resolve() + fonts.init( Path(__file__).parent.parent.resolve() .joinpath('src').joinpath('sliceitoff').joinpath('assets')) self.life = Life() diff --git a/tests/test_screens.py b/tests/test_screens.py index 8e5ab34..00cf694 100644 --- a/tests/test_screens.py +++ b/tests/test_screens.py @@ -3,7 +3,7 @@ import unittest from pathlib import Path -from sliceitoff.text import Fonts, TextPage +from sliceitoff.text import fonts, TextPage from sliceitoff.screens import ( gameover_screen, @@ -17,7 +17,7 @@ from sliceitoff.screens import ( class TestScreens(unittest.TestCase): def setUp(self): - Fonts.load_fonts( Path(__file__).parent.parent.resolve() + fonts.init( Path(__file__).parent.parent.resolve() .joinpath('src').joinpath('sliceitoff').joinpath('assets')) def test_can_run_gameover(self): diff --git a/tests/test_text.py b/tests/test_text.py index 6cd8c5a..5228782 100644 --- a/tests/test_text.py +++ b/tests/test_text.py @@ -3,11 +3,11 @@ import unittest from pathlib import Path -from sliceitoff.text import Fonts, TextPage +from sliceitoff.text import fonts, TextPage class TestText(unittest.TestCase): def setUp(self): - Fonts.load_fonts( Path(__file__).parent.parent.resolve() + fonts.init( Path(__file__).parent.parent.resolve() .joinpath('src').joinpath('sliceitoff').joinpath('assets')) def test_can_create(self): -- cgit v1.2.3