aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/tests/QtCore/qbytearray_concatenation_operator_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside2/tests/QtCore/qbytearray_concatenation_operator_test.py')
-rw-r--r--sources/pyside2/tests/QtCore/qbytearray_concatenation_operator_test.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/sources/pyside2/tests/QtCore/qbytearray_concatenation_operator_test.py b/sources/pyside2/tests/QtCore/qbytearray_concatenation_operator_test.py
index 1375c3ab3..6d369bf0b 100644
--- a/sources/pyside2/tests/QtCore/qbytearray_concatenation_operator_test.py
+++ b/sources/pyside2/tests/QtCore/qbytearray_concatenation_operator_test.py
@@ -40,25 +40,25 @@ from init_paths import init_test_paths
init_test_paths(False)
from PySide2.QtCore import QByteArray
-import py3kcompat as py3k
+
class QByteArrayConcatenationOperatorTest(unittest.TestCase):
'''Test cases for QByteArray concatenation with '+' operator'''
def testConcatQByteArrayAndPythonString(self):
#Test concatenation of a QByteArray with a Python bytes, in this order
- qba = QByteArray(py3k.b('foo'))
- result = qba + py3k.b('\x00bar')
+ qba = QByteArray(bytes('foo', "UTF-8"))
+ result = qba + bytes('\x00bar', "UTF-8")
self.assertEqual(type(result), QByteArray)
- self.assertEqual(result, py3k.b('foo\x00bar'))
+ self.assertEqual(result, bytes('foo\x00bar', "UTF-8"))
def testConcatPythonStringAndQByteArray(self):
#Test concatenation of a Python bytes with a QByteArray, in this order
concat_python_string_add_qbytearray_worked = True
- qba = QByteArray(py3k.b('foo'))
- result = py3k.b('bar\x00') + qba
+ qba = QByteArray(bytes('foo', "UTF-8"))
+ result = bytes('bar\x00', "UTF-8") + qba
self.assertEqual(type(result), QByteArray)
- self.assertEqual(result, py3k.b('bar\x00foo'))
+ self.assertEqual(result, bytes('bar\x00foo', "UTF-8"))
if __name__ == '__main__':
unittest.main()