diff options
author | Viljami Ilola <+@hix.fi> | 2024-03-31 18:49:36 +0300 |
---|---|---|
committer | Viljami Ilola <+@hix.fi> | 2024-03-31 18:49:36 +0300 |
commit | d2e42bfa99d8bb417d8eaf365d290a071ad49b7f (patch) | |
tree | f6c4f9977de8cf986977cd7d6ad9462209225517 /tests/test_enemies.py | |
parent | 7d3a90fae189dc30dd053e299addc7def113764a (diff) |
fix enemy count test & v0.2v0.2
Diffstat (limited to 'tests/test_enemies.py')
-rw-r--r-- | tests/test_enemies.py | 8 |
1 files changed, 5 insertions, 3 deletions
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) |