blob: aaf2b0cd5fbf591eb346d3709abf3cb8c1a459cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
import os
import unittest
from pathlib import Path
from enemies.enemies import EnemySprite, Enemies
from text import Fonts
class TestEnemySprite(unittest.TestCase):
def test_can_create(self):
enemy = EnemySprite()
self.assertNotEqual(None, enemy)
class TestEnemies(unittest.TestCase):
def setUp(self):
Fonts.load_fonts(os.path.join(
Path(__file__).parent.parent.resolve(),
"src",
"sliceitoff"))
def test_can_create(self):
enemies = Enemies()
self.assertNotEqual(None, enemies)
def test_right_amount_of_enemies(self):
enemies = Enemies(count = 6)
self.assertEqual(6, len(enemies.sprites()))
|