aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtGui/bug_632.py
blob: e189393b25373f94cc82ff74e2204b907b5530d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import sys
from PySide.QtGui import QLineEdit, QApplication
import unittest


class Bug589(unittest.TestCase):
    def testWrongSignature(self):
        text = QLineEdit("PySide bug 632")
        a = b = c = d = 0
        self.assertRaises(TypeError, text.getTextMargins, (a, b, c, d))

    def testTupleReturn(self):
        text = QLineEdit("PySide bug 632")
        text.setTextMargins(10, 20, 30, 40)
        (a, b, c, d) = text.getTextMargins()
        self.assert_((a, b, c, d), (10, 20, 30, 40))

if __name__ == "__main__":
   app = QApplication(sys.argv)
   unittest.main()