diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-07-21 16:25:22 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:38 -0300 |
commit | 0b6bafdd447f56c9910a41f039f9ed1431af04ee (patch) | |
tree | a7167506551c9b0f701c745329fecb69030bc59b /tests | |
parent | 673a7d1bccdaa522b8b8d9aee48cb6d0c0c5a342 (diff) |
Fix bug 934 - "A __getitem__ of QByteArray behaves strange"
Diffstat (limited to 'tests')
-rw-r--r-- | tests/QtCore/qbytearray_operator_test.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/QtCore/qbytearray_operator_test.py b/tests/QtCore/qbytearray_operator_test.py index 662bc6e0c..50bb5f7e8 100644 --- a/tests/QtCore/qbytearray_operator_test.py +++ b/tests/QtCore/qbytearray_operator_test.py @@ -56,6 +56,10 @@ class QByteArrayOperatorAt(unittest.TestCase): obj = QByteArray(string) self.assertRaises(IndexError, lambda :obj[len(string)]) + def testNullStrings(self): + ba = QByteArray('\x00') + self.assertEqual(ba.at(0), '\x00') + self.assertEqual(ba[0], '\x00') class QByteArrayOperatorLen(unittest.TestCase): '''Test case for __len__ operator of QByteArray''' |