diff options
Diffstat (limited to 'tests/QtCore/qbytearray_test.py')
-rw-r--r-- | tests/QtCore/qbytearray_test.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/QtCore/qbytearray_test.py b/tests/QtCore/qbytearray_test.py index 396545f4e..fa838c19f 100644 --- a/tests/QtCore/qbytearray_test.py +++ b/tests/QtCore/qbytearray_test.py @@ -105,6 +105,15 @@ class QByteArrayOnQVariant(unittest.TestCase): a = QSettings().value("some_prop", QByteArray()) self.assertEqual(type(a), QByteArray) +class TestBug666(unittest.TestCase): + '''QByteArray does not support slices''' + def testIt(self): + ba = QByteArray('1234567890') + self.assertEqual(ba[2:4], '34') + self.assertEqual(ba[:4], '1234') + self.assertEqual(ba[4:], '567890') + self.assertEqual(len(ba[4:1]), 0) + class QByteArrayBug514(unittest.TestCase): def testIt(self): data = "foobar" |