示例#1
0
    def testSample(self):
        dictionary = ['ART', 'RAT', 'CAT', 'CAR']
        alphabet = Alphabet()

        result = alphabet.get_alphabet(dictionary)
        self.assertIn(result, (['A', 'T', 'R', 'C'], ['T', 'A', 'R', 'C']))
示例#2
0
    def testEmpty(self):
        dictionary = []
        alphabet = Alphabet()

        result = alphabet.get_alphabet(dictionary)
        self.assertEqual(result, [])
示例#3
0
    def testOneLetter(self):
        dictionary = ['a', 'aa', 'aaa', 'aaaa']
        alphabet = Alphabet()

        result = alphabet.get_alphabet(dictionary)
        self.assertEqual(result, ['a'])