diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-09-03 11:14:55 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-09-04 05:26:18 +0000 |
commit | f47818b5c710aa6ae5f76809046105cb8c3d9f7f (patch) | |
tree | c83b7acb7d19203519bd70a899bb8c4b23997b7e /sources/pyside2/tests/QtWidgets/qimage_test.py | |
parent | e796600c9663a26ccf1929aca8336eb0cb23fe5d (diff) |
Remove Python2 from PySide2 tests
Task-number: PYSIDE-1339
Task-number: PYSIDE-904
Change-Id: Idc6c185c0c848476a60d91b802af760fc2b70a30
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside2/tests/QtWidgets/qimage_test.py')
-rw-r--r-- | sources/pyside2/tests/QtWidgets/qimage_test.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sources/pyside2/tests/QtWidgets/qimage_test.py b/sources/pyside2/tests/QtWidgets/qimage_test.py index 8bb83c51a..11b9d2193 100644 --- a/sources/pyside2/tests/QtWidgets/qimage_test.py +++ b/sources/pyside2/tests/QtWidgets/qimage_test.py @@ -36,7 +36,6 @@ sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from init_paths import init_test_paths init_test_paths(False) -import py3kcompat as py3k from PySide2.QtGui import * from PySide2.QtWidgets import * from helper.helper import adjust_filename @@ -292,17 +291,11 @@ class QImageTest(UsesQApplication): data2 = img1.scanLine(0) self.assertEqual(data1, data2) - # 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) + img = QImage(bytes('', "UTF-8"), 100, 100, QImage.Format_ARGB32) def testEmptyStringAsBuffer(self): - img = QImage(py3k.b(''), 100, 100, QImage.Format_ARGB32) + img = QImage(bytes('', "UTF-8"), 100, 100, QImage.Format_ARGB32) def testXpmConstructor(self): label = QLabel() |