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']))
def testEmpty(self): dictionary = [] alphabet = Alphabet() result = alphabet.get_alphabet(dictionary) self.assertEqual(result, [])
def testOneLetter(self): dictionary = ['a', 'aa', 'aaa', 'aaaa'] alphabet = Alphabet() result = alphabet.get_alphabet(dictionary) self.assertEqual(result, ['a'])