summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViljami Ilola <+@hix.fi>2024-03-31 18:49:36 +0300
committerViljami Ilola <+@hix.fi>2024-03-31 18:49:36 +0300
commitd2e42bfa99d8bb417d8eaf365d290a071ad49b7f (patch)
treef6c4f9977de8cf986977cd7d6ad9462209225517
parent7d3a90fae189dc30dd053e299addc7def113764a (diff)
fix enemy count test & v0.2v0.2
-rw-r--r--pyproject.toml3
-rw-r--r--tests/test_enemies.py8
2 files changed, 6 insertions, 5 deletions
diff --git a/pyproject.toml b/pyproject.toml
index 3a3fe81..ea19274 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "sliceitoff"
-version = "0.2-beta"
+version = "0.2"
description = "Arcade game where one slices play area off avoiding enemies."
authors = ["Viljami Ilola <+@hix.fi>"]
readme = "README.md"
@@ -32,7 +32,6 @@ source-roots = ["src/sliceitoff"]
extension-pkg-whitelist = ["pygame"]
[tool.pylint."messages control"]
-#disable = [ "c-extension-no-member" ]
disable = [
"too-few-public-methods" # pygame sprites and groups
]
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)