diff options
author | Renato Filho <renato.filho@openbossa.org> | 2011-10-07 15:03:53 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:56:13 -0300 |
commit | 1cefc091180ec4cf44e68e2a776ae1b4bc6d189b (patch) | |
tree | 4d9dc31df2e311577baae67383917835f46c8d44 /tests/QtGui | |
parent | b841afdb5c09ab431110b34ee463b95d64557731 (diff) |
Fixed unittest to work with python3.
Diffstat (limited to 'tests/QtGui')
-rw-r--r-- | tests/QtGui/qimage_test.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/QtGui/qimage_test.py b/tests/QtGui/qimage_test.py index 8f416b8bb..bf73355cd 100644 --- a/tests/QtGui/qimage_test.py +++ b/tests/QtGui/qimage_test.py @@ -255,8 +255,12 @@ class QImageTest(UsesQApplication): data1 = img0.scanLine(0) data2 = img1.scanLine(0) self.assertEqual(data1, data2) - self.assertEqual(data1, py3k.buffer(img0.bits()[:img0.bytesPerLine()])) - self.assertEqual(data2, py3k.buffer(img0.bits()[:img0.bytesPerLine()])) + + # PySide python 3.x does not support slice yet + if not py3k.IS_PY3K: + buff = py3k.buffer(img0.bits()[:img0.bytesPerLine()]) + self.assertEqual(data1, buff) + self.assertEqual(data2, buff) def testEmptyBuffer(self): img = QImage(py3k.buffer(''), 100, 100, QImage.Format_ARGB32) |