diff --git a/exercises/practice/wordy/.meta/additional_tests.json b/exercises/practice/wordy/.meta/additional_tests.json index 089dd45046b..447b532c051 100644 --- a/exercises/practice/wordy/.meta/additional_tests.json +++ b/exercises/practice/wordy/.meta/additional_tests.json @@ -1,5 +1,29 @@ { "cases": [ + { + "description": "4 number question", + "property": "answer", + "input": { + "question": "What is 1 plus -10 multiplied by 3 minus 4?" + }, + "expected": -31 + }, + { + "description": "4 number question with zero", + "property": "answer", + "input": { + "question": "What is 12 minus 0 divided by 6 plus 5?" + }, + "expected": 7 + }, + { + "description": "5 number question", + "property": "answer", + "input": { + "question": "What is 3 multiplied by 6 minus 2 divided by 4 plus 11?" + }, + "expected": 15 + }, { "description": "Missing operation", "property": "answer", diff --git a/exercises/practice/wordy/.meta/config.json b/exercises/practice/wordy/.meta/config.json index 07c63417075..33783d17376 100644 --- a/exercises/practice/wordy/.meta/config.json +++ b/exercises/practice/wordy/.meta/config.json @@ -21,7 +21,8 @@ "rootulp", "sjakobi", "tqa236", - "yawpitch" + "yawpitch", + "yrahcaz7" ], "files": { "solution": [ diff --git a/exercises/practice/wordy/wordy_test.py b/exercises/practice/wordy/wordy_test.py index c34ed27cda7..b49b1e71205 100644 --- a/exercises/practice/wordy/wordy_test.py +++ b/exercises/practice/wordy/wordy_test.py @@ -1,6 +1,6 @@ # These tests are auto-generated with test data from: # https://github.com/exercism/problem-specifications/tree/main/exercises/wordy/canonical-data.json -# File last updated on 2025-06-20 +# File last updated on 2026-05-22 import unittest @@ -111,6 +111,17 @@ def test_reject_prefix_notation(self): # Additional tests for this track + def test_4_number_question(self): + self.assertEqual(answer("What is 1 plus -10 multiplied by 3 minus 4?"), -31) + + def test_4_number_question_with_zero(self): + self.assertEqual(answer("What is 12 minus 0 divided by 6 plus 5?"), 7) + + def test_5_number_question(self): + self.assertEqual( + answer("What is 3 multiplied by 6 minus 2 divided by 4 plus 11?"), 15 + ) + def test_missing_operation(self): with self.assertRaises(ValueError) as err: answer("What is 2 2 minus 3?")