Sha256: e641473403b72f5d7a3eb0cef851b28484ca191327c0bf24ce449efbc805ccb7

Contents?: true

Size: 832 Bytes

Versions: 26

Compression:

Stored size: 832 Bytes

Contents

import unittest

from scrabble_score import score


class WordTest(unittest.TestCase):
    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'))

    def test_scores_very_short_word(self):
        self.assertEqual(1, score('a'))

    def test_scores_other_very_short_word(self):
        self.assertEqual(4, score('f'))

    def test_simple_word_scores_the_number_of_letters(self):
        self.assertEqual(6, score("street"))

    def test_complicated_word_scores_more(self):
        self.assertEqual(22, score("quirky"))

    def test_scores_are_case_insensitive(self):
        self.assertEqual(41, score("OxyphenButazone"))

if __name__ == '__main__':
    unittest.main()

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
trackler-2.0.3.0 tracks/python/exercises/scrabble-score/scrabble_score_test.py
trackler-2.0.2.0 tracks/python/exercises/scrabble-score/scrabble_score_test.py
trackler-2.0.1.2 tracks/python/exercises/scrabble-score/scrabble_score_test.py
trackler-2.0.1.1 tracks/python/exercises/scrabble-score/scrabble_score_test.py
trackler-2.0.1.0 tracks/python/exercises/scrabble-score/scrabble_score_test.py
trackler-2.0.0.10 tracks/python/exercises/scrabble-score/scrabble_score_test.py
trackler-2.0.0.9 tracks/python/exercises/scrabble-score/scrabble_score_test.py
trackler-2.0.0.8 tracks/python/exercises/scrabble-score/scrabble_score_test.py
trackler-2.0.0.7 tracks/python/exercises/scrabble-score/scrabble_score_test.py
trackler-2.0.0.6 tracks/python/exercises/scrabble-score/scrabble_score_test.py
trackler-2.0.0.5 tracks/python/exercises/scrabble-score/scrabble_score_test.py
trackler-2.0.0.4 tracks/python/exercises/scrabble-score/scrabble_score_test.py
trackler-2.0.0.3 tracks/python/exercises/scrabble-score/scrabble_score_test.py
trackler-2.0.0.2 tracks/python/exercises/scrabble-score/scrabble_score_test.py
trackler-2.0.0.1 tracks/python/exercises/scrabble-score/scrabble_score_test.py
trackler-2.0.0.0 tracks/python/exercises/scrabble-score/scrabble_score_test.py
trackler-1.0.4.1 tracks/python/exercises/scrabble-score/scrabble_score_test.py
trackler-1.0.4.0 tracks/python/exercises/scrabble-score/scrabble_score_test.py
trackler-1.0.3.0 tracks/python/exercises/scrabble-score/scrabble_score_test.py
trackler-1.0.2.1 tracks/python/exercises/scrabble-score/scrabble_score_test.py