aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLuciano Wolf <luciano.wolf@openbossa.org>2010-02-18 16:33:23 -0300
committerLuciano Wolf <luciano.wolf@openbossa.org>2010-02-18 16:47:40 -0300
commitaa2a2a57030dec2e8b73b017de5f157aae0fb5e5 (patch)
tree2bb9408d159e070a265910749471ba2800f57458 /tests
parent97dd19383811a68cde71f9655ca2566517a596c8 (diff)
Improve qpixmap test to support qstring and qsize arguments.
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/qtgui/qpixmap_test.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/qtgui/qpixmap_test.py b/tests/qtgui/qpixmap_test.py
index 1bff9fff3..ce6c1eaba 100644
--- a/tests/qtgui/qpixmap_test.py
+++ b/tests/qtgui/qpixmap_test.py
@@ -2,15 +2,21 @@ import unittest
from helper import UsesQApplication
from PySide.QtGui import QPixmap
-from PySide.QtCore import QVariant
+from PySide.QtCore import QVariant, QSize, QString
-#Only test if is possible create a QPixmap from a QVariant
class QPixmapTest(UsesQApplication):
def testQVariantConstructor(self):
pixmap = QPixmap()
v = QVariant(pixmap)
pixmap_copy = QPixmap(v)
+ def testQSizeConstructor(self):
+ pixmap = QPixmap(QSize(10,20))
+ self.assert_(pixmap.size().height(), 20)
+
+ def testQStringConstructor(self):
+ pixmap = QPixmap(QString("Testing!"))
+
if __name__ == '__main__':
unittest.main()