Sha256: 7092738dd946cf13d625877388e35a6761332007ed741ee6ebc1a9f8d76d0a19

Contents?: true

Size: 1.07 KB

Versions: 34

Compression:

Stored size: 1.07 KB

Contents

import unittest
from isogram import is_isogram


# test cases adapted from `x-common//canonical-data.json` @ version: 1.0.0

class TestIsogram(unittest.TestCase):

    def test_empty_string(self):
        self.assertTrue(is_isogram(""))

    def test_isogram_with_only_lower_case_characters(self):
        self.assertTrue(is_isogram("isogram"))

    def test_word_with_one_duplicated_character(self):
        self.assertFalse(is_isogram("eleven"))

    def test_longest_reported_english_isogram(self):
        self.assertTrue(is_isogram("subdermatoglyphic"))

    def test_word_with_duplicated_character_in_mixed_case(self):
        self.assertFalse(is_isogram("Alphabet"))

    def test_hypothetical_isogrammic_word_with_hyphen(self):
        self.assertTrue(is_isogram("thumbscrew-japingly"))

    def test_isogram_with_duplicated_non_letter_character(self):
        self.assertTrue(is_isogram("Hjelmqvist-Gryb-Zock-Pfund-Wax"))

    def test_made_up_name_that_is_an_isogram(self):
        self.assertTrue(is_isogram("Emily Jung Schwartzkopf"))


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

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
trackler-2.1.0.2 tracks/python/exercises/isogram/isogram_test.py
trackler-2.1.0.1 tracks/python/exercises/isogram/isogram_test.py
trackler-2.1.0.0 tracks/python/exercises/isogram/isogram_test.py
trackler-2.0.8.55 tracks/python/exercises/isogram/isogram_test.py
trackler-2.0.8.54 tracks/python/exercises/isogram/isogram_test.py
trackler-2.0.8.53 tracks/python/exercises/isogram/isogram_test.py
trackler-2.0.8.52 tracks/python/exercises/isogram/isogram_test.py
trackler-2.0.8.51 tracks/python/exercises/isogram/isogram_test.py
trackler-2.0.8.50 tracks/python/exercises/isogram/isogram_test.py
trackler-2.0.8.49 tracks/python/exercises/isogram/isogram_test.py
trackler-2.0.8.48 tracks/python/exercises/isogram/isogram_test.py
trackler-2.0.8.47 tracks/python/exercises/isogram/isogram_test.py
trackler-2.0.8.46 tracks/python/exercises/isogram/isogram_test.py
trackler-2.0.8.45 tracks/python/exercises/isogram/isogram_test.py
trackler-2.0.8.44 tracks/python/exercises/isogram/isogram_test.py
trackler-2.0.8.43 tracks/python/exercises/isogram/isogram_test.py
trackler-2.0.8.42 tracks/python/exercises/isogram/isogram_test.py
trackler-2.0.8.41 tracks/python/exercises/isogram/isogram_test.py
trackler-2.0.8.40 tracks/python/exercises/isogram/isogram_test.py
trackler-2.0.8.39 tracks/python/exercises/isogram/isogram_test.py