aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/QtGui/qimage_test.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/QtGui/qimage_test.py b/tests/QtGui/qimage_test.py
index e9af2d71d..b1a302676 100644
--- a/tests/QtGui/qimage_test.py
+++ b/tests/QtGui/qimage_test.py
@@ -2,8 +2,8 @@
'''Test cases for QImage'''
import unittest
-from PySide.QtGui import *
-from helper import *
+from PySide.QtGui import QImage
+from helper import UsesQApplication, adjust_filename
class QImageTest(UsesQApplication):
'''Test case for calling setPixel with float as argument'''
@@ -27,6 +27,13 @@ class QImageTest(UsesQApplication):
self.assertEquals(str(data1), img0.bits()[:img0.bytesPerLine()])
self.assertEquals(str(data2), img0.bits()[:img0.bytesPerLine()])
+ def testEmptyBuffer(self):
+ img = QImage(buffer(''), 100, 100, QImage.Format_ARGB32)
+
+ def testEmptyStringAsBuffer(self):
+ img = QImage('', 100, 100, QImage.Format_ARGB32)
+
+
if __name__ == '__main__':
unittest.main()