def testRpmmvIsNotALegalWord(self): """ `Rpmmv` is not a legal word, because there are no vowels. """ poetry = Poetry() word = "Rpmmv" results = poetry.isLegalWord(word) self.assertEqual(False, results)
def testRymmvIsALegalWord(self): """ In the word, `Rymmv`, y acts as a vowel, therefore `Rymmv` is a legal word. """ poetry = Poetry() word = "Rymmv" results = poetry.isLegalWord(word) self.assertEqual(True, results)
def test4ppleIsNotALegalWord(self): """ A legal word does not contain numbers, because it does not belong in a-zA-Z. """ poetry = Poetry() word = "4pple" results = poetry.isLegalWord(word) self.assertEqual(False, results)
def testAppleIsALegalWord(self): """ `apple` is a word because... (1) every letter belongs in a-zA-Z, (2) there is at least one vowel—in this example, there are exactly 2. """ poetry = Poetry() word = "apple" results = poetry.isLegalWord(word) self.assertEqual(True, results)