From fee8be4c408f44f5862ca74ca6f4b961a18a4fd1 Mon Sep 17 00:00:00 2001 From: Felienne Hermans Date: Wed, 10 Jan 2024 14:57:28 +0100 Subject: [PATCH] add test --- tests/test_level/test_level_03.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/test_level/test_level_03.py b/tests/test_level/test_level_03.py index 203bf73b424..0ce4b313206 100644 --- a/tests/test_level/test_level_03.py +++ b/tests/test_level/test_level_03.py @@ -882,3 +882,21 @@ def test_play_random(self): expected=expected, max_level=11 ) + + +def test_play_chord(self): + code = textwrap.dedent("""\ + play C4 E4 D4""") + + expected = textwrap.dedent("""\ + play(notes_mapping.get(str(C4), notes_mapping.get(str(C4), notes_mapping.get(str(C4)))) + time.sleep(0.5)""") + + self.multi_level_tester( + code=code, + translate=False, + skip_faulty=False, + unused_allowed=True, + expected=expected, + max_level=11 + )