def testGoodCase(self): fileName = 'data/cmudict-0.7b' self.assertEqual(RhymingDictionary.getSounds(fileName, 'ORANGE'), ['AO1', 'R', 'AH0', 'N', 'JH'])
def testFailedCase(self): fileName = 'data/cmudict-0.7b' self.assertEqual(RhymingDictionary.getSounds(fileName, 'NUINFQO'), [])
def testLowerCase(self): fileName = 'data/cmudict-0.7b' self.assertEqual(RhymingDictionary.getSounds(fileName, 'bab'), ['B', 'AE1', 'B'])
def test_1(self): self.assertEqual(RhymingDictionary.getSounds("data/cmudict-0.7b", "CAR"), ['K', 'AA1', 'R'])
def test_Shipping3(self): self.assertEqual(RhymingDictionary.getSounds("data/cmudict-0.7b", ""), [])
def test_Shipping2(self): self.assertEqual(RhymingDictionary.getSounds("data/cmudict-0.7b", "FAR"), ['F', 'AA1', 'R'])