aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/QtCore/qbytearray_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests/QtCore/qbytearray_test.py')
-rw-r--r--sources/pyside6/tests/QtCore/qbytearray_test.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/sources/pyside6/tests/QtCore/qbytearray_test.py b/sources/pyside6/tests/QtCore/qbytearray_test.py
index 69e608d98..c347a6e4d 100644
--- a/sources/pyside6/tests/QtCore/qbytearray_test.py
+++ b/sources/pyside6/tests/QtCore/qbytearray_test.py
@@ -45,6 +45,7 @@ init_test_paths(False)
from PySide6.QtCore import QByteArray, QSettings, QObject, QDataStream, QIODevice
+
class QByteArrayTestToNumber(unittest.TestCase):
def testToNumberInt(self):
obj = QByteArray(bytes('37', "UTF8"))
@@ -95,10 +96,11 @@ class QByteArraySplit(unittest.TestCase):
'''Test case for QByteArray.split'''
def testPathSeparator(self):
- #QByteArray.split('/')
+ # QByteArray.split('/')
obj = QByteArray(bytes(unittest.__file__, "UTF8"))
self.assertEqual(obj.split('/'), unittest.__file__.split('/'))
+
class QByteArrayData(unittest.TestCase):
'''Test case for QByteArray.data'''
@@ -114,6 +116,7 @@ class QByteArrayData(unittest.TestCase):
self.assertEqual(s1, s2)
self.assertEqual(s1, ba)
+
class QByteArrayOperatorAtSetter(unittest.TestCase):
'''Test case for operator QByteArray[] - __setitem__'''
@@ -123,6 +126,7 @@ class QByteArrayOperatorAtSetter(unittest.TestCase):
obj[1] = bytes('0', "UTF8")
self.assertEqual(obj, QByteArray(bytes('103456', "UTF8")))
+
class QByteArrayOnQDataStream(unittest.TestCase):
'''
Bug PYSIDE-232
@@ -134,6 +138,7 @@ class QByteArrayOnQDataStream(unittest.TestCase):
# The __repr__ not suppose to crash anymore
self.assertNotEqual(repr(b), None)
+
class TestBug664(unittest.TestCase):
'''
QByteArray.data() should return correct data
@@ -148,6 +153,7 @@ class QByteArrayOnQVariant(unittest.TestCase):
a = QSettings().value("some_prop", QByteArray())
self.assertEqual(type(a), QByteArray)
+
class TestBug567(unittest.TestCase):
'''
QByteArray should support slices
@@ -171,12 +177,14 @@ class TestPickler(unittest.TestCase):
ba2 = pickle.loads(output)
self.assertEqual(str(ba), str(ba2))
+
class QByteArrayBug720(unittest.TestCase):
def testIt(self):
ba = QByteArray(bytes("32\"1\x00123", "UTF8"))
self.assertEqual(str(ba), str(bytes("32\"1\x00123", "UTF-8")))
self.assertEqual(repr(ba), "PySide6.QtCore.QByteArray(b'32\"1\\x00123')")
+
class QByteArrayImplicitConvert(unittest.TestCase):
def testString(self):
# No implicit conversions from QByteArray to python string