summaryrefslogtreecommitdiff
path: root/tests/test_status.py
diff options
context:
space:
mode:
authorViljami Ilola <+@hix.fi>2024-04-10 17:00:23 +0300
committerViljami Ilola <+@hix.fi>2024-04-10 17:00:23 +0300
commit43e1a7425e525a1da0c805db16a2c54b56fc1580 (patch)
treec2b99aadc7ce06290b432ec5c634334199bfce27 /tests/test_status.py
parentaab1bd74450e7c074417e25919c1cd8e71c31d82 (diff)
tests for statusline
Diffstat (limited to 'tests/test_status.py')
-rw-r--r--tests/test_status.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/test_status.py b/tests/test_status.py
new file mode 100644
index 0000000..a365ea6
--- /dev/null
+++ b/tests/test_status.py
@@ -0,0 +1,23 @@
+import unittest
+import pygame
+
+from pathlib import Path
+
+from sliceitoff.stats import Stats
+from sliceitoff.status import Status
+
+class TestStatus(unittest.TestCase):
+ def setUp(self):
+ self.stats = Stats()
+ self.status = Status( stats = self.stats)
+
+ def test_can_create(self):
+ self.assertNotEqual(None, self.status)
+
+ def test_updating_without_crash(self):
+ for _ in range(100):
+ self.status.update(dt=100)
+ for _ in range(100):
+ self.stats.add_score(100)
+ self.stats.percent -= 1
+ self.status.update(dt=100)