Skip to content

Commit

Permalink
Removed President test case and regnerated test file. Corrected forma…
Browse files Browse the repository at this point in the history
…tting in approaches introduction.
  • Loading branch information
BethanyG committed Feb 15, 2025
1 parent 7a12eeb commit 266e5f6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
7 changes: 5 additions & 2 deletions exercises/practice/wordy/.approaches/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,11 @@ For question cleaning, [`str.removeprefix`][removeprefix] and
'Supercalifragilistic'


#The two methods can be chained to remove both a suffix and prefix in one line.
>>> 'Supercalifragilisticexpialidocious'.removesuffix('expialidocious').removeprefix('Super')
#The two methods can be chained to remove both a suffix and prefix in "one line".
#The line has been broken up here for better display.
>>> ('Supercalifragilisticexpialidocious'
.removesuffix('expialidocious')
.removeprefix('Super'))
'califragilistic'
```

Expand Down
1 change: 1 addition & 0 deletions exercises/practice/wordy/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ description = "unknown operation"

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

[42d78b5f-dbd7-4cdb-8b30-00f794bb24cf]
description = "reject problem missing an operand"
Expand Down
8 changes: 1 addition & 7 deletions exercises/practice/wordy/wordy_test.py
Original file line number Diff line number Diff line change
@@ -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 2023-07-19
# File last updated on 2025-02-15

import unittest

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

def test_non_math_question(self):
with self.assertRaises(ValueError) as err:
answer("Who is the President of the United States?")
self.assertEqual(type(err.exception), ValueError)
self.assertEqual(err.exception.args[0], "unknown operation")

def test_reject_problem_missing_an_operand(self):
with self.assertRaises(ValueError) as err:
answer("What is 1 plus?")
Expand Down

0 comments on commit 266e5f6

Please sign in to comment.