Skip to content

Commit 9551433

Browse files
aldracoyawpitch
authored andcommitted
Update tests for Bob. (#2167)
* Generate updated tests for Bob to reflect language updates. Relevant PRs - https://github.com/exercism/problem-specifications/pull/1631/files - https://github.com/exercism/problem-specifications/pull/1632/files * Update docs for GENERATOR with clarification for running the script.
1 parent e3e96da commit 9551433

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

docs/GENERATOR.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ creating test files from the canonical data.
1818
## Script Usage
1919

2020
Test generation requires a local copy of the [problem-specifications] repository.
21+
The script should be run from the root `python` directory, in order to correctly
22+
access the exercises.
2123

2224
Run `bin/generate_tests.py --help` for usage information.
2325

exercises/bob/bob_test.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from bob import response
44

5-
# Tests adapted from `problem-specifications//canonical-data.json` @ v1.4.0
5+
# Tests adapted from `problem-specifications//canonical-data.json` @ v1.6.0
66

77

88
class BobTest(unittest.TestCase):
@@ -27,17 +27,16 @@ def test_asking_gibberish(self):
2727
self.assertEqual(response("fffbbcbeab?"), "Sure.")
2828

2929
def test_talking_forcefully(self):
30-
self.assertEqual(response("Let's go make out behind the gym!"), "Whatever.")
30+
self.assertEqual(response("Hi there!"), "Whatever.")
3131

3232
def test_using_acronyms_in_regular_speech(self):
3333
self.assertEqual(
34-
response("It's OK if you don't want to go to the DMV."), "Whatever."
34+
response("It's OK if you don't want to go work for NASA."), "Whatever."
3535
)
3636

3737
def test_forceful_question(self):
3838
self.assertEqual(
39-
response("WHAT THE HELL WERE YOU THINKING?"),
40-
"Calm down, I know what I'm doing!",
39+
response("WHAT'S GOING ON?"), "Calm down, I know what I'm doing!"
4140
)
4241

4342
def test_shouting_numbers(self):
@@ -56,7 +55,7 @@ def test_shouting_with_special_characters(self):
5655
)
5756

5857
def test_shouting_with_no_exclamation_mark(self):
59-
self.assertEqual(response("I HATE THE DMV"), "Whoa, chill out!")
58+
self.assertEqual(response("I HATE THE DENTIST"), "Whoa, chill out!")
6059

6160
def test_statement_containing_question_mark(self):
6261
self.assertEqual(response("Ending with ? means a question."), "Whatever.")

0 commit comments

Comments
 (0)