2
'''Test cases for QImage'''
6
from PySide.QtGui import QImage, qRgb
8
from helper import UsesQApplication
10
class SetPixelFloat(UsesQApplication):
11
'''Test case for calling setPixel with float as argument'''
15
super(SetPixelFloat, self).setUp()
16
self.color = qRgb(255, 0, 0)
17
self.image = QImage(200, 200, QImage.Format_RGB32)
23
super(SetPixelFloat, self).tearDown()
26
#QImage.setPixel(float, float, color) - Implicit conversion
27
self.image.setPixel(3.14, 4.2, self.color)
28
self.assertEqual(self.image.pixel(3.14, 4.2), self.color)
31
if __name__ == '__main__':