From ab918abc1e103e0ca86939f7d057e8a44ac8a4ef Mon Sep 17 00:00:00 2001 From: Renato Filho Date: Mon, 7 Jun 2010 14:43:45 -0300 Subject: Created new unittest model. Separete unittest for module. Only run unittest for compiled modules. Reviewer: Marcelo Lira , Luciano Wolf --- tests/QtGui/hashabletype_test.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/QtGui/hashabletype_test.py (limited to 'tests/QtGui/hashabletype_test.py') 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() + -- cgit v1.2.3