Removed President test case and regnerated test file. Corrected formatting in approaches introduction. (#3868)
[no important files changed]
This commit is contained in:
@@ -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'
|
||||
```
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -61,12 +61,6 @@ class WordyTest(unittest.TestCase):
|
||||
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?")
|
||||
|
||||
Reference in New Issue
Block a user