コード例 #1
0
    def test_generate_syllable_first_char_is_consonant(self):
        my_syllable = Lab_05.generate_syllable()

        self.assertIn(my_syllable[0], [
            'b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q',
            'r', 's', 't', 'v', 'w', 'x', 'y', 'z'
        ])
コード例 #2
0
    def test_generate_syllable_is_2_char_long(self):
        my_syllable = Lab_05.generate_syllable()

        self.assertEqual(len(my_syllable), 2)
コード例 #3
0
    def test_generate_syllable_char_2_is_vowel(self):
        my_syllable = Lab_05.generate_syllable()

        self.assertIn(my_syllable[1], ['a', 'e', 'i', 'o', 'u', 'y'])