Esempio n. 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']))
Esempio n. 2
0
    def testEmpty(self):
        dictionary = []
        alphabet = Alphabet()

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

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