From d2e42bfa99d8bb417d8eaf365d290a071ad49b7f Mon Sep 17 00:00:00 2001 From: Viljami Ilola <+@hix.fi> Date: Sun, 31 Mar 2024 18:49:36 +0300 Subject: fix enemy count test & v0.2 --- tests/test_enemies.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/test_enemies.py b/tests/test_enemies.py index ed114ae..5182ea2 100644 --- a/tests/test_enemies.py +++ b/tests/test_enemies.py @@ -31,10 +31,12 @@ class TestEnemies(unittest.TestCase): 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())) + for _ in range(10): + enemies = Enemies(count = 6) + self.assertTrue( len(enemies.sprites()) in range(3,7) ) def test_update_notcrashing(self): enemies = Enemies(count = 6) -- cgit v1.2.3