From 360a680cdb03df60673581a8f187c4074a78dd21 Mon Sep 17 00:00:00 2001 From: Viljami Ilola <+@hix.fi> Date: Sat, 20 Apr 2024 23:45:57 +0300 Subject: add tests for sfx --- tests/test_sfx.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/test_sfx.py 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("", 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") -- cgit v1.2.3