PySide/tests/QtGui/qimage_test.py
Marcelo Lira 0a5e353ad0 Fixes QImage constructor signature that used string buffer as image data source.
The fixes uses the patch provided by Pieter Palmers on the bug #489
description[1].

A very simple test, to check the signature existence, was added.

[1] http://bugs.openbossa.org/show_bug.cgi?id=489

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
2010-12-06 17:49:56 -03:00

20 lines
500 B
Python

'''Test cases for QImage'''
import unittest
from PySide.QtGui import QImage
from helper import UsesQApplication
class QImageTest(UsesQApplication):
'''Test case for calling setPixel with float as argument'''
def testQImageStringBuffer(self):
'''Test if the QImage signatures receiving string buffers exist.'''
img0 = QImage('', 100, 100, QImage.Format_ARGB32)
img1 = QImage('', 100, 100, 0, QImage.Format_ARGB32)
if __name__ == '__main__':
unittest.main()