def testTopNMatchesNGreaterThanListLength(self): self.assertEqual(hw.topNmatches("a", 4, ["b", "c", "d"]), ['b', 'c', 'd'])
def testTopNMatchesSingleResplacement(self): self.assertEqual(hw.topNmatches("spam", 3, ["spam", "seam", "wow", "cs5blackrocks", "span", "synecdoche"]), ['seam', 'spam', 'span'])
def testTopNMatchesReturnsWholeList(self): self.assertEqual(hw.topNmatches("a", 3, ["b", "c", "d"]), ['b', 'c', 'd'])
def testTopNMatchesBaseCase(self): self.assertEqual(hw.topNmatches("test", 0, ["spam", "seam", "wow"]), [])
def testTopNMatchesCorrectSpelling(self): self.assertEqual(hw.topNmatches("spam", 1, ["spam", "seam", "wow", "cs5blackrocks", "span", "synecdoche"]), ['spam'])
def testTopNMatchesSingleResplacement(self): self.assertEqual( hw.topNmatches( "spam", 3, ["spam", "seam", "wow", "cs5blackrocks", "span", "synecdoche" ]), ['seam', 'spam', 'span'])
def testTopNMatchesCorrectSpelling(self): self.assertEqual( hw.topNmatches( "spam", 1, ["spam", "seam", "wow", "cs5blackrocks", "span", "synecdoche" ]), ['spam'])