Example #1
0
 def test_silence(self):
     self.assertEqual(
         'Fine. Be that way!', bob.hey('')
     )
 def test_question_with_only_numbers(self):
     self.assertEqual(
         'Sure.', bob.hey('4?')
     )
 def test_shouting_with_no_exclamation_mark(self):
     self.assertEqual(
         'Whoa, chill out!', bob.hey('I HATE YOU')
     )
 def test_shouting(self):
     self.assertEqual(
         'Whoa, chill out!',
         bob.hey('WATCH OUT!')
     )
 def test_using_acronyms_in_regular_speech(self):
     self.assertEqual(
         'Whatever.', bob.hey('It is fine you do not want to go to the DMV.')
     )
Example #6
0
 def test_multiple_line_question(self):
     self.assertEqual(
         hey("\nDoes this cryogenic chamber make me look fat?\nNo."),
         "Whatever.")
Example #7
0
 def test_other_whitespace(self):
     self.assertEqual(hey("\n\r \t"), "Fine. Be that way!")
Example #8
0
 def test_other_whitespace(self):
     self.assertEqual(hey("\n\r \t"), "Fine. Be that way!")
Example #9
0
 def test_non_question_ending_with_whitespace(self):
     self.assertEqual(
         hey("This is a statement ending with whitespace      "),
         "Whatever.")
Example #10
0
 def test_silence(self):
     self.assertEqual(hey(""), "Fine. Be that way!")
Example #11
0
 def test_ending_with_whitespace(self):
     self.assertEqual(hey("Okay if like my  spacebar  quite a bit?   "),
                      "Sure.")
Example #12
0
 def test_question_with_no_letters(self):
     self.assertEqual(hey("4?"), "Sure.")
Example #13
0
 def test_no_letters(self):
     self.assertEqual(hey("1, 2, 3"), "Whatever.")
Example #14
0
 def test_forceful_question(self):
     self.assertEqual(hey("WHAT THE HELL WERE YOU THINKING?"),
                      "Calm down, I know what I'm doing!")
Example #15
0
 def test_non_letters_with_question(self):
     self.assertEqual(hey(":) ?"), "Sure.")
Example #16
0
 def test_stating_something(self):
     self.assertEqual(bob.hey("Tom-ay-to, tom-aaaah-to."), "Whatever.")
Example #17
0
 def test_prolonged_silence(self):
     self.assertEqual(hey("          "), "Fine. Be that way!")
Example #18
0
 def test_shouting(self):
     self.assertEqual(bob.hey("WATCH OUT!"), "Whoa, chill out!")
Example #19
0
 def test_starting_with_whitespace(self):
     self.assertEqual(hey("         hmmmmmmm..."), "Whatever.")
Example #20
0
 def test_shouting_gibberish(self):
     self.assertEqual(bob.hey("FCECDFCAAB"), "Whoa, chill out!")
 def test_stating_something(self):
     self.assertEqual(
         'Whatever.',
         bob.hey('Tom-ay-to, tom-aaaah-to.')
     )
Example #22
0
 def test_asking_a_question(self):
     self.assertEqual(
         bob.hey("Does this cryogenic chamber make me look fat?"), "Sure.")
 def test_asking_a_numeric_question(self):
     self.assertEqual(
         'Sure.',
         bob.hey('You are, what, like 15?')
     )
Example #24
0
 def test_asking_a_numeric_question(self):
     self.assertEqual(bob.hey("You are, what, like 15?"), "Sure.")
 def test_shouting_numbers(self):
     self.assertEqual(
         'Whoa, chill out!', bob.hey('1, 2, 3 GO!')
     )
Example #26
0
 def test_asking_gibberish(self):
     self.assertEqual(bob.hey("fffbbcbeab?"), "Sure.")
 def test_shouting_with_umlauts(self):
     self.assertEqual(
         'Whoa, chill out!', bob.hey('ÜMLÄÜTS!')
     )
Example #28
0
 def test_talking_forcefully(self):
     self.assertEqual(bob.hey("Let's go make out behind the gym!"),
                      "Whatever.")
 def test_prattling_on(self):
     self.assertEqual(
         'Sure.', bob.hey('Wait! Hang on. Are you going to be OK?')
     )
Example #30
0
 def test_using_acronyms_in_regular_speech(self):
     self.assertEqual(
         bob.hey("It's OK if you don't want to go to the DMV."),
         "Whatever.")
Example #31
0
 def test_statement_containing_question_mark(self):
     self.assertEqual(
         hey("Ending with ? means a question."), "Whatever.")
Example #32
0
 def test_forceful_question(self):
     self.assertEqual(bob.hey("WHAT THE HELL WERE YOU THINKING?"),
                      "Whoa, chill out!")
Example #33
0
 def test_prattling_on(self):
     self.assertEqual(
         hey("Wait! Hang on. Are you going to be OK?"), "Sure.")
Example #34
0
 def test_shouting_numbers(self):
     self.assertEqual(bob.hey("1, 2, 3 GO!"), "Whoa, chill out!")
Example #35
0
 def test_alternate_silence(self):
     self.assertEqual(hey("\t\t\t\t\t\t\t\t\t\t"), "Fine. Be that way!")
Example #36
0
 def test_only_numbers(self):
     self.assertEqual(bob.hey("1, 2, 3"), "Whatever.")
Example #37
0
 def test_stating_something(self):
     self.assertEqual(hey("Tom-ay-to, tom-aaaah-to."), "Whatever.")
Example #38
0
 def test_question_with_only_numbers(self):
     self.assertEqual(bob.hey("4?"), "Sure.")
Example #39
0
 def test_ending_with_whitespace(self):
     self.assertEqual(
         hey("Okay if like my  spacebar  quite a bit?   "), "Sure.")
Example #40
0
 def test_shouting_with_special_characters(self):
     self.assertEqual(
         bob.hey("ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!"),
         "Whoa, chill out!")
Example #41
0
 def test_non_question_ending_with_whitespace(self):
     self.assertEqual(
         hey("This is a statement ending with whitespace      "),
         "Whatever.")
Example #42
0
 def test_shouting_with_no_exclamation_mark(self):
     self.assertEqual(bob.hey("I HATE YOU"), "Whoa, chill out!")
 def test_starts_with_whitespace(self):
     self.assertEqual(
         'Whatever.', bob.hey('hmmmmmmm...')
     )
Example #44
0
 def test_statement_containing_question_mark(self):
     self.assertEqual(bob.hey("Ending with ? means a question."),
                      "Whatever.")
 def test_asking_a_question(self):
     self.assertEqual(
         'Sure.',
         bob.hey('Does this cryogenic chamber make me look fat?')
     )
Example #46
0
 def test_non_letters_with_question(self):
     self.assertEqual(bob.hey(":) ?"), "Sure.")
 def test_talking_forcefully(self):
     self.assertEqual(
         'Whoa, chill out!',
         bob.hey('Lets go make out behind the gym!')
     )
Example #48
0
 def test_prattling_on(self):
     self.assertEqual(bob.hey("Wait! Hang on. Are you going to be OK?"),
                      "Sure.")
 def test_forceful_questions(self):
     self.assertEqual(
         'Whoa, chill out!', bob.hey('WHAT THE HELL WERE YOU THINKING?')
     )
Example #50
0
 def test_prolonged_silence(self):
     self.assertEqual(bob.hey("          "), "Fine. Be that way!")
 def test_only_numbers(self):
     self.assertEqual(
         'Whatever.', bob.hey('1, 2, 3')
     )
Example #52
0
 def test_alternate_silence(self):
     self.assertEqual(bob.hey("\t\t\t\t\t\t\t\t\t\t"), "Fine. Be that way!")
 def test_shouting_with_special_characters(self):
     self.assertEqual(
         'Whoa, chill out!',
         bob.hey('ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!')
     )
Example #54
0
 def test_multiple_line_question(self):
     self.assertEqual(
         bob.hey("\nDoes this cryogenic chamber make me look fat?\nno"),
         "Whatever.")
 def test_calmly_speaking_with_umlauts(self):
     self.assertEqual(
         'Whatever.', bob.hey('ÜMLäÜTS!')
     )
Example #56
0
 def test_starting_with_whitespace(self):
     self.assertEqual(bob.hey("         hmmmmmmm..."), "Whatever.")
 def test_statement_containing_question_mark(self):
     self.assertEqual(
         'Whatever.', bob.hey('Ending with ? means a question.')
     )
Example #58
0
 def test_shouting_with_no_exclamation_mark(self):
     self.assertEqual(hey("I HATE THE DMV"), "Whoa, chill out!")
 def test_silence(self):
     self.assertEqual(
         'Fine. Be that way!', bob.hey(' ')
     )
Example #60
0
 def test_statement_containing_question_mark(self):
     self.assertEqual(
         'Whatever.', bob.hey('Ending with ? means a question.')
     )