From 2545f9c373c634aef3080b0871df43339ad3b3bb Mon Sep 17 00:00:00 2001 From: aldraco Date: Fri, 17 Jan 2020 21:00:31 -0700 Subject: [PATCH 1/2] 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 --- exercises/bob/bob_test.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/exercises/bob/bob_test.py b/exercises/bob/bob_test.py index d8000a6de5..2d607655b9 100644 --- a/exercises/bob/bob_test.py +++ b/exercises/bob/bob_test.py @@ -2,7 +2,7 @@ from bob import response -# Tests adapted from `problem-specifications//canonical-data.json` @ v1.4.0 +# Tests adapted from `problem-specifications//canonical-data.json` @ v1.6.0 class BobTest(unittest.TestCase): @@ -27,17 +27,16 @@ def test_asking_gibberish(self): self.assertEqual(response("fffbbcbeab?"), "Sure.") def test_talking_forcefully(self): - self.assertEqual(response("Let's go make out behind the gym!"), "Whatever.") + self.assertEqual(response("Hi there!"), "Whatever.") def test_using_acronyms_in_regular_speech(self): self.assertEqual( - response("It's OK if you don't want to go to the DMV."), "Whatever." + response("It's OK if you don't want to go work for NASA."), "Whatever." ) def test_forceful_question(self): self.assertEqual( - response("WHAT THE HELL WERE YOU THINKING?"), - "Calm down, I know what I'm doing!", + response("WHAT'S GOING ON?"), "Calm down, I know what I'm doing!" ) def test_shouting_numbers(self): @@ -56,7 +55,7 @@ def test_shouting_with_special_characters(self): ) def test_shouting_with_no_exclamation_mark(self): - self.assertEqual(response("I HATE THE DMV"), "Whoa, chill out!") + self.assertEqual(response("I HATE THE DENTIST"), "Whoa, chill out!") def test_statement_containing_question_mark(self): self.assertEqual(response("Ending with ? means a question."), "Whatever.") From 6f183ed20a51a5e87c501e66220496babab17286 Mon Sep 17 00:00:00 2001 From: aldraco Date: Fri, 17 Jan 2020 21:13:25 -0700 Subject: [PATCH 2/2] Update docs for GENERATOR with clarification for running the script. --- docs/GENERATOR.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/GENERATOR.md b/docs/GENERATOR.md index 6c41e3c338..d1a8a1da49 100644 --- a/docs/GENERATOR.md +++ b/docs/GENERATOR.md @@ -18,6 +18,8 @@ creating test files from the canonical data. ## Script Usage Test generation requires a local copy of the [problem-specifications] repository. +The script should be run from the root `python` directory, in order to correctly +access the exercises. Run `bin/generate_tests.py --help` for usage information.