예제 #1
0
 def test_lowercase_letter(self):
     self.assertEqual(score("a"), 1)
예제 #2
0
 def test_valuable_letter(self):
     self.assertEqual(score("f"), 4)
예제 #3
0
 def test_long_mixed_case_word(self):
     self.assertEqual(score("OxyphenButazone"), 41)
예제 #4
0
 def test_empty_input(self):
     self.assertEqual(score(""), 0)
예제 #5
0
 def test_scores_very_short_word(self):
     self.assertEqual(1, score('a'))
예제 #6
0
 def test_scores_are_case_insensitive(self):
     self.assertEqual(41, score("OxyphenButazone"))
 def test_short_word(self):
     assert score("at") == 2
예제 #8
0
 def test_english_like_word(self):
     self.assertEqual(score("pinata"), 8)
예제 #9
0
 def test_invalid_word_scores_zero(self):
     self.assertEqual(score(''), 0)
     self.assertEqual(score(' \t\n'), 0)
     self.assertEqual(score('hous3'), 0)
     self.assertEqual(score('wo rd'), 0)
 def test_valuable_letter(self):
     assert score("f") == 4
예제 #11
0
 def test_scores_are_case_insensitive(self):
     self.assertEqual(score("OxyphenButazone"), 41)
예제 #12
0
 def test_complicated_word_scores_more(self):
     self.assertEqual(score("quirky"), 22)
예제 #13
0
 def test_simple_word_scores_the_number_of_letters(self):
     self.assertEqual(score("street"), 6)
예제 #14
0
 def test_short_valuable_word(self):
     self.assertEqual(score("zoo"), 12)
 def test_short_valuable_word(self):
     assert score("zoo") == 12
예제 #16
0
 def test_medium_valuable_word(self):
     self.assertEqual(score("quirky"), 22)
 def test_medium_word(self):
     assert score("street") == 6
예제 #18
0
 def test_entire_alphabet_available(self):
     self.assertEqual(score("abcdefghijklmnopqrstuvwxyz"), 87)
 def test_medium_valuable_word(self):
     assert score("quirky") == 22
예제 #20
0
 def test_simple_word_scores_the_number_of_letters(self):
     self.assertEqual(6, score("street"))
 def test_long_mixed_case_word(self):
     assert score("OxyphenButazone") == 41
예제 #22
0
 def test_scores_other_very_short_word(self):
     self.assertEqual(score('f'), 4)
 def test_english_like_word(self):
     assert score("pinata") == 8
예제 #24
0
 def test_english_like_word(self):
     self.assertEqual(score("pinata"), 8)
 def test_empty_input(self):
     assert score("") == 0
예제 #26
0
 def test_entire_alphabet_available(self):
     self.assertEqual(score("abcdefghijklmnopqrstuvwxyz"), 87)
 def test_entire_alphabet_available(self):
     assert score("abcdefghijklmnopqrstuvwxyz") == 87
예제 #28
0
 def test_uppercase_letter(self):
     self.assertEqual(score("A"), 1)
 def test_lowercase_letter(self):
     assert score("a") == 1
예제 #30
0
 def test_short_word(self):
     self.assertEqual(score("at"), 2)
 def test_uppercase_letter(self):
     assert score("A") == 1
예제 #32
0
 def test_medium_word(self):
     self.assertEqual(score("street"), 6)
예제 #33
0
 def test_uppercase_letter(self):
     self.assertEqual(score("A"), 1)
예제 #34
0
 def test_long_mixed_case_word(self):
     self.assertEqual(score("OxyphenButazone"), 41)
예제 #35
0
 def test_valuable_letter(self):
     self.assertEqual(score("f"), 4)
예제 #36
0
 def test_empty_input(self):
     self.assertEqual(score(""), 0)
예제 #37
0
 def test_short_word(self):
     self.assertEqual(score("at"), 2)
예제 #38
0
 def test_lowercase_letter(self):
     self.assertEqual(score("a"), 1)
예제 #39
0
 def test_short_valuable_word(self):
     self.assertEqual(score("zoo"), 12)
예제 #40
0
 def test_scores_other_very_short_word(self):
     self.assertEqual(4, score('f'))
예제 #41
0
 def test_medium_word(self):
     self.assertEqual(score("street"), 6)
예제 #42
0
 def test_complicated_word_scores_more(self):
     self.assertEqual(22, score("quirky"))
예제 #43
0
 def test_medium_valuable_word(self):
     self.assertEqual(score("quirky"), 22)
예제 #44
0
 def test_invalid_word_scores_zero(self):
     self.assertEqual(0, score(''))
     self.assertEqual(0, score(' \t\n'))
     self.assertEqual(0, score('hous3'))
     self.assertEqual(0, score('wo rd'))
예제 #45
0
 def test_scores_very_short_word(self):
     self.assertEqual(score('a'), 1)