def METHOD_NAME(self, x, y):
    # check both that x and y are equal and that their hashes are equal
    self.assertEqual(hash(x), hash(y),
                     "got different hashes for {!r} and {!r}".format(x, y))
    self.assertEqual(x, y)