aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-04-13 18:26:00 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:54:11 -0300
commiteed7193f32218465381ddb5c0310585006674add (patch)
tree182a1903b3c1ce3ae6940978d813f76edc7fca02 /tests
parent6efe441b766852764c4638f41b5ae556c93a9aa8 (diff)
Fixes bug #742 - Method "void QPrinter::getPageMargins(qreal*,qreal*,qreal*,qreal*,Unit) const" missing
Also added unit tests. http://bugs.pyside.org/show_bug.cgi?id=742
Diffstat (limited to 'tests')
-rw-r--r--tests/QtGui/returnquadruplesofnumbers_test.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/QtGui/returnquadruplesofnumbers_test.py b/tests/QtGui/returnquadruplesofnumbers_test.py
index fad622e8f..7e5361936 100644
--- a/tests/QtGui/returnquadruplesofnumbers_test.py
+++ b/tests/QtGui/returnquadruplesofnumbers_test.py
@@ -1,5 +1,5 @@
import unittest
-from PySide.QtGui import QLayout, QWidget, QGraphicsLayout, QGraphicsLayoutItem, QTextCursor
+from PySide.QtGui import QLayout, QWidget, QGraphicsLayout, QGraphicsLayoutItem, QTextCursor, QPrinter
from helper import UsesQApplication
@@ -43,6 +43,13 @@ class ReturnsQuadruplesOfNumbers(UsesQApplication):
obj = QTextCursor()
self.assertEquals(obj.selectedTableCells(), (-1, -1, -1, -1))
+ def testQPrinterGetPageMargins(self):
+ # Bug #742
+ obj = QPrinter()
+ values = (10.0, 20.0, 30.0, 40.0, QPrinter.Point)
+ obj.setPageMargins(*values)
+ self.assertEquals(obj.getPageMargins(QPrinter.Point), values[:-1])
+
if __name__ == "__main__":
unittest.main()