blob: ce6c1eaba0760baba21c92fb3c2c7f0f0d8c4966 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import unittest
from helper import UsesQApplication
from PySide.QtGui import QPixmap
from PySide.QtCore import QVariant, QSize, QString
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()
|