summaryrefslogtreecommitdiffstats
path: root/tests/QtCore/qrect_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtCore/qrect_test.py')
-rw-r--r--tests/QtCore/qrect_test.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/QtCore/qrect_test.py b/tests/QtCore/qrect_test.py
index 3c5f5be..a6d38d9 100644
--- a/tests/QtCore/qrect_test.py
+++ b/tests/QtCore/qrect_test.py
@@ -3,7 +3,7 @@
import unittest
-from PySide.QtCore import QPoint, QRect
+from PySide.QtCore import QPoint, QRect, QRectF
class RectConstructor(unittest.TestCase):
@@ -97,6 +97,16 @@ class RectOperator(unittest.TestCase):
rect3 = rect1 | rect2
self.assertEqual(rect3, rect1)
+ def testGetCoordsAndRect(self):
+ rect1 = QRect(1, 2, 3, 4)
+ self.assertEqual(rect1.getRect(), (1, 2, 3, 4))
+ self.assertEqual(rect1.getCoords(), (1, 2, 3, 5))
+
+ rect1 = QRectF(1, 2, 3, 4)
+ self.assertEqual(rect1.getRect(), (1, 2, 3, 4))
+ self.assertEqual(rect1.getCoords(), (1, 2, 4, 6))
+
+
if __name__ == '__main__':
unittest.main()