diff options
Diffstat (limited to 'tests/QtGui/hashabletype_test.py')
-rw-r--r-- | tests/QtGui/hashabletype_test.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/QtGui/hashabletype_test.py b/tests/QtGui/hashabletype_test.py new file mode 100644 index 000000000..64683a398 --- /dev/null +++ b/tests/QtGui/hashabletype_test.py @@ -0,0 +1,18 @@ +'''Test cases for __hash__''' + +import unittest + +from PySide.QtGui import QTreeWidgetItem +from helper import UsesQApplication + +class HashableTest(UsesQApplication): + + def testQTreeWidgetItemHash(self): + h = {} + obj = QTreeWidgetItem() + h[obj] = 2 + self.assert_(h.get(obj), 2) + +if __name__ == '__main__': + unittest.main() + |