def test_hash(self):
        for obj_1, obj_2 in self.eq_pairs:
            try:
                assert hash(obj_1) == hash(obj_2)
            except KeyboardInterrupt:
                raise
            except AssertionError:
                self.fail("%s and %s do not hash equal" % (obj_1, obj_2))
            except Exception, e:
                self.fail("Problem hashing %s and %s: %s" % (obj_1, obj_2, e))

        for obj_1, obj_2 in self.ne_pairs:
            try:
                assert hash(obj_1) != hash(obj_2)
            except KeyboardInterrupt:
                raise
            except AssertionError:
                self.fail("%s and %s hash equal, but shouldn't" % (obj_1, obj_2))
            except Exception, e:
                self.fail("Problem hashing %s and %s: %s" % (obj_1, obj_2, e))


################################################################
### /Support code
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/test/test_unittest.py/TestHashing.test_hash/original