diff options
Diffstat (limited to 'tests/test_sfx.py')
-rw-r--r-- | tests/test_sfx.py | 24 |
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) |