summaryrefslogtreecommitdiff
path: root/tests/test_sfx.py
diff options
context:
space:
mode:
authorViljami Ilola <+@hix.fi>2024-04-27 02:20:46 +0300
committerViljami Ilola <+@hix.fi>2024-04-27 02:20:46 +0300
commitd73fe4bb20e544443476ebb4c9fc593fa0a8ad4a (patch)
tree9a0669819d4f18cf1a118f0755d78dd95959dc7c /tests/test_sfx.py
parentdb5967a52d9409842581276154a6fa9763a57a24 (diff)
fix tests
Diffstat (limited to 'tests/test_sfx.py')
-rw-r--r--tests/test_sfx.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/test_sfx.py b/tests/test_sfx.py
index 1aaf53e..35483a5 100644
--- a/tests/test_sfx.py
+++ b/tests/test_sfx.py
@@ -18,3 +18,27 @@ class TestSfx(unittest.TestCase):
def test_play(self):
sfx.play("laser")
+
+ def test_music(self):
+ sfx.music("baby")
+ sfx.music("baby")
+ sfx.music("glass")
+ sfx.music(None)
+
+ def test_sfx_volume_control(self):
+ old_vol = sfx.sfx_volume
+ sfx.sfx_up()
+ self.assertNotEqual(old_vol, sfx.sfx_volume)
+ for _ in range(10):
+ sfx.sfx_up()
+ self.assertEqual(old_vol, sfx.sfx_volume)
+
+ def test_music_volume_control(self):
+ old_vol = sfx.music_volume
+ sfx.music(None)
+ sfx.music_up()
+ sfx.music("glass")
+ self.assertNotEqual(old_vol, sfx.music_volume)
+ for _ in range(10):
+ sfx.music_up()
+ self.assertEqual(old_vol, sfx.music_volume)