aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2011-01-24 11:13:27 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:51:49 -0300
commitb66595efa544b2675fef7ec2c6832dba5d8c1177 (patch)
tree79a04cbc39be99694d4022a82e4e10cbbf78ccb3 /tests
parentf2cce0a1b594efc6edf901848a609f3f7209e870 (diff)
Fixed QLineEdit.getTextMargins return value.
Fixes bug #632 Reviewer: Hugo Parente Lima <hugo.pl@gmail.com> Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/QtGui/bug_632.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/QtGui/bug_632.py b/tests/QtGui/bug_632.py
new file mode 100644
index 000000000..e189393b2
--- /dev/null
+++ b/tests/QtGui/bug_632.py
@@ -0,0 +1,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()