aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtGui
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtGui')
-rw-r--r--tests/QtGui/CMakeLists.txt1
-rw-r--r--tests/QtGui/returnquadruplesofnumbers_test.py48
2 files changed, 49 insertions, 0 deletions
diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt
index 9306efdcc..ef62638fc 100644
--- a/tests/QtGui/CMakeLists.txt
+++ b/tests/QtGui/CMakeLists.txt
@@ -110,6 +110,7 @@ PYSIDE_TEST(qwidget_setlayout_test.py)
PYSIDE_TEST(qwidget_test.py)
PYSIDE_TEST(reference_count_test.py)
PYSIDE_TEST(repr_test.py)
+PYSIDE_TEST(returnquadruplesofnumbers_test.py)
PYSIDE_TEST(standardpixmap_test.py)
PYSIDE_TEST(timed_app_test.py)
PYSIDE_TEST(virtual_protected_inheritance_test.py)
diff --git a/tests/QtGui/returnquadruplesofnumbers_test.py b/tests/QtGui/returnquadruplesofnumbers_test.py
new file mode 100644
index 000000000..fad622e8f
--- /dev/null
+++ b/tests/QtGui/returnquadruplesofnumbers_test.py
@@ -0,0 +1,48 @@
+import unittest
+from PySide.QtGui import QLayout, QWidget, QGraphicsLayout, QGraphicsLayoutItem, QTextCursor
+
+from helper import UsesQApplication
+
+class Layout(QLayout):
+ def __init__(self):
+ QLayout.__init__(self)
+
+class GraphicsLayout(QGraphicsLayout):
+ def __init__(self):
+ QGraphicsLayout.__init__(self)
+
+class GraphicsLayoutItem(QGraphicsLayoutItem):
+ def __init__(self):
+ QGraphicsLayoutItem.__init__(self)
+
+class ReturnsQuadruplesOfNumbers(UsesQApplication):
+
+ def testQGraphicsLayoutGetContentsMargins(self):
+ obj = GraphicsLayout()
+ values = (10.0, 20.0, 30.0, 40.0)
+ obj.setContentsMargins(*values)
+ self.assertEquals(obj.getContentsMargins(), values)
+
+ def testQGraphicsLayoutItemGetContentsMargins(self):
+ obj = GraphicsLayoutItem()
+ self.assertEquals(obj.getContentsMargins(), (0.0, 0.0, 0.0, 0.0))
+
+ def testQWidgetGetContentsMargins(self):
+ obj = QWidget()
+ values = (10, 20, 30, 40)
+ obj.setContentsMargins(*values)
+ self.assertEquals(obj.getContentsMargins(), values)
+
+ def testQLayoutGetContentsMargins(self):
+ obj = Layout()
+ values = (10, 20, 30, 40)
+ obj.setContentsMargins(*values)
+ self.assertEquals(obj.getContentsMargins(), values)
+
+ def testQTextCursorSelectedTableCells(self):
+ obj = QTextCursor()
+ self.assertEquals(obj.selectedTableCells(), (-1, -1, -1, -1))
+
+if __name__ == "__main__":
+ unittest.main()
+