aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/QtCore/qcbor_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests/QtCore/qcbor_test.py')
-rw-r--r--sources/pyside6/tests/QtCore/qcbor_test.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sources/pyside6/tests/QtCore/qcbor_test.py b/sources/pyside6/tests/QtCore/qcbor_test.py
index 06ba2d4d1..0df9d9f95 100644
--- a/sources/pyside6/tests/QtCore/qcbor_test.py
+++ b/sources/pyside6/tests/QtCore/qcbor_test.py
@@ -42,6 +42,7 @@ init_test_paths(False)
from PySide6.QtCore import (QByteArray, QCborStreamReader, QCborStreamWriter,
QCborValue)
+
class TestCbor(unittest.TestCase):
def testReader(self):
ba = QByteArray()
@@ -62,7 +63,7 @@ class TestCbor(unittest.TestCase):
self.assertTrue(not ba.isEmpty())
reader = QCborStreamReader(ba)
self.assertTrue(reader.hasNext())
- if (reader.isByteArray()): # Python 2
+ if (reader.isByteArray()): # Python 2
value = reader.readByteArray()
self.assertTrue(value)
self.assertEqual(value.data, "hello")
@@ -77,5 +78,6 @@ class TestCbor(unittest.TestCase):
self.assertTrue(value.isString())
self.assertEqual(value.toString(), 'hello')
+
if __name__ == '__main__':
unittest.main()