Skip to content

Commit 6ffac57

Browse files
authored
Removed President test case and regnerated test file. Corrected formatting in approaches introduction. (exercism#3868)
[no important files changed]
1 parent 7a12eeb commit 6ffac57

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

exercises/practice/wordy/.approaches/introduction.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@ For question cleaning, [`str.removeprefix`][removeprefix] and
5454
'Supercalifragilistic'
5555

5656

57-
#The two methods can be chained to remove both a suffix and prefix in one line.
58-
>>> 'Supercalifragilisticexpialidocious'.removesuffix('expialidocious').removeprefix('Super')
57+
#The two methods can be chained to remove both a suffix and prefix in "one line".
58+
#The line has been broken up here for better display.
59+
>>> ('Supercalifragilisticexpialidocious'
60+
.removesuffix('expialidocious')
61+
.removeprefix('Super'))
5962
'califragilistic'
6063
```
6164

exercises/practice/wordy/.meta/tests.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ description = "unknown operation"
5252

5353
[8a7e85a8-9e7b-4d46-868f-6d759f4648f8]
5454
description = "Non math question"
55+
include = false
5556

5657
[42d78b5f-dbd7-4cdb-8b30-00f794bb24cf]
5758
description = "reject problem missing an operand"

exercises/practice/wordy/wordy_test.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/wordy/canonical-data.json
3-
# File last updated on 2023-07-19
3+
# File last updated on 2025-02-15
44

55
import unittest
66

@@ -61,12 +61,6 @@ def test_unknown_operation(self):
6161
self.assertEqual(type(err.exception), ValueError)
6262
self.assertEqual(err.exception.args[0], "unknown operation")
6363

64-
def test_non_math_question(self):
65-
with self.assertRaises(ValueError) as err:
66-
answer("Who is the President of the United States?")
67-
self.assertEqual(type(err.exception), ValueError)
68-
self.assertEqual(err.exception.args[0], "unknown operation")
69-
7064
def test_reject_problem_missing_an_operand(self):
7165
with self.assertRaises(ValueError) as err:
7266
answer("What is 1 plus?")

0 commit comments

Comments
 (0)