def test_difference(self): abcd = ['a', 'b', 'c', 'd'] efgh = ['e', 'f', 'g', 'h'] fedc = ['c', 'd', 'e', 'f'] # cdef is cython keyword O_o feed = ['f', 'e', 'e', 'd'] self.assertEqual(difference(abcd, efgh), ['a', 'b', 'c', 'd']) self.assertEqual(difference(efgh, fedc), ['g', 'h']) self.assertEqual(difference([], []), []) self.assertEqual(difference(abcd, abcd), []) self.assertEqual(difference(fedc, feed), ['c']) self.assertEqual(difference(feed, abcd), ['f', 'e', 'e']) self.assertEqual(difference(abcd, feed), ['a', 'b', 'c'])