diff options
author | Renato Filho <renato.filho@openbossa.org> | 2011-10-06 11:38:31 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:56:11 -0300 |
commit | d9dd3192326d6d36a4123ba3cebfe5d196476fe5 (patch) | |
tree | 08e2338fdcd7ed8821f73444e78cf1f135f9be35 /tests/QtGui/qimage_test.py | |
parent | edaefbce481634b2f9d5a6e28c2e73db7f958602 (diff) |
Updated QtGui modue to works with python 2.x and 3.x
Diffstat (limited to 'tests/QtGui/qimage_test.py')
-rw-r--r-- | tests/QtGui/qimage_test.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/QtGui/qimage_test.py b/tests/QtGui/qimage_test.py index 2eb55ac99..8f416b8bb 100644 --- a/tests/QtGui/qimage_test.py +++ b/tests/QtGui/qimage_test.py @@ -2,6 +2,7 @@ '''Test cases for QImage''' import unittest +import py3kcompat as py3k from PySide.QtGui import * from helper import UsesQApplication, adjust_filename @@ -254,14 +255,14 @@ class QImageTest(UsesQApplication): data1 = img0.scanLine(0) data2 = img1.scanLine(0) self.assertEqual(data1, data2) - self.assertEquals(str(data1), img0.bits()[:img0.bytesPerLine()]) - self.assertEquals(str(data2), img0.bits()[:img0.bytesPerLine()]) + self.assertEqual(data1, py3k.buffer(img0.bits()[:img0.bytesPerLine()])) + self.assertEqual(data2, py3k.buffer(img0.bits()[:img0.bytesPerLine()])) def testEmptyBuffer(self): - img = QImage(buffer(''), 100, 100, QImage.Format_ARGB32) + img = QImage(py3k.buffer(''), 100, 100, QImage.Format_ARGB32) def testEmptyStringAsBuffer(self): - img = QImage('', 100, 100, QImage.Format_ARGB32) + img = QImage(py3k.b(''), 100, 100, QImage.Format_ARGB32) def testXpmConstructor(self): label = QLabel() |