aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtGui/bug_569.py
blob: 00d92ed549be8a4c4275811f1a464ee42ff5e109 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from PySide.QtCore import *
from PySide.QtGui import *
import unittest


class TestBug569(unittest.TestCase):

    def testIt(self):
        types = (QTableWidgetItem, QListWidgetItem, QTreeWidgetItem)
        for t in types:
            a = t()
            a.__lt__ = lambda(other) : True
            b = t()
            b.__lt__ = lambda(other) : False
            self.assertTrue(a < b)
            self.assertFalse(b < a)

if __name__ == '__main__':
    unittest.main()