def testPositiveWithTuple(self): self.assertEqual(getAnagrams('dam', ('dam', 'ma d', 'mam')), ['dam', 'ma d'])
def testException(self): self.assertRaises(TypeError, getAnagrams(1, [1, 2, 3]), [1])
def testPositiveWithSpace(self): inputList = ['Ogdred Weary', 'Regera Dowdy', 'E G Deadworry'] expectedOutput = ['Ogdred Weary', 'Regera Dowdy', 'E G Deadworry'] self.assertEqual(getAnagrams('Edward Gorey', inputList), expectedOutput)
def testNegativeWithList(self): self.assertNotEqual(getAnagrams('abc', ['abc', 'cba', 'ba']), ['ba'])
def testPositiveWithList(self): inputList = ['pastier', 'pirates', 'traipse', 'piratis'] expectedOutput = ['pastier', 'pirates', 'traipse'] self.assertEqual(getAnagrams('parties', inputList), expectedOutput)