diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-05-02 21:45:52 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.lima@openbossa.org> | 2012-05-03 03:13:50 +0200 |
commit | 54cce10fa8a9942450c9e1a9d9a9d2a1b688f243 (patch) | |
tree | b15e041fc2a891846f38565c655c32a2546e7be3 /tests | |
parent | 9a8eaf81a4694088cb2a5f3fcea753ea588cb7cf (diff) |
Set a default hash function for all ObjectTypes.
Fix bug PYSIDE-42
Change-Id: I1392374dcf0055309152082e674cc1e3e6472d4d
Reviewed-by: Paulo Alcantara <paulo.alcantara@openbossa.org>
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/otherbinding/objtypehashes_test.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/otherbinding/objtypehashes_test.py b/tests/otherbinding/objtypehashes_test.py new file mode 100644 index 000000000..37ae9b85c --- /dev/null +++ b/tests/otherbinding/objtypehashes_test.py @@ -0,0 +1,17 @@ +import unittest +from sample import * +from other import * + +class TestHashFuncs (unittest.TestCase): + + def testIt(self): + obj1 = HandleHolder() + obj2 = HandleHolder() + + hash1 = hash(obj1) + hash2 = hash(obj2) + self.assertNotEqual(hash1, hash2) + self.assertNotEqual(hash(HandleHolder()), hash(HandleHolder())) + +if __name__ == '__main__': + unittest.main() |