summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViljami Ilola <+@hix.fi>2024-04-20 23:45:57 +0300
committerViljami Ilola <+@hix.fi>2024-04-20 23:45:57 +0300
commit360a680cdb03df60673581a8f187c4074a78dd21 (patch)
treeec08ccf818dda529db17e81182bb09906031c424
parent9ae60c3e487fbceb54cee462d4f8f0b0a3682ba1 (diff)
add tests for sfxv0.3b6
-rw-r--r--tests/test_sfx.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test_sfx.py b/tests/test_sfx.py
new file mode 100644
index 0000000..1aaf53e
--- /dev/null
+++ b/tests/test_sfx.py
@@ -0,0 +1,20 @@
+import unittest
+
+from pathlib import Path
+
+from sliceitoff.sfx import sfx
+
+class TestSfx(unittest.TestCase):
+ def test_sfx_is_created_on_import(self):
+ self.assertEqual("<class 'sliceitoff.sfx.sfx.Sfx'>", str(type(sfx)))
+
+ def test_sfx_is_always_same(self):
+ from sliceitoff.sfx import sfx as sfx2
+ self.assertEqual(sfx, sfx2)
+
+ def test_init_works(self):
+ sfx.init( Path(__file__).parent.parent.resolve()
+ .joinpath('src').joinpath('sliceitoff').joinpath('assets'))
+
+ def test_play(self):
+ sfx.play("laser")