aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtCore
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-04-06 15:59:01 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:54:08 -0300
commite3b24c2204fedb0141ddd949e4f556d345780df1 (patch)
tree140e1bc78c67a9778cc083218abb5861919b25ec /tests/QtCore
parentc06cec65df9db1b580cb24d43bfc6a5f46b20f17 (diff)
Fix 720 - "QByteArray prints itself wrong, on tp_print and tp_repr"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'tests/QtCore')
-rw-r--r--tests/QtCore/qbytearray_test.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/QtCore/qbytearray_test.py b/tests/QtCore/qbytearray_test.py
index 4a600ba31..330a7d09f 100644
--- a/tests/QtCore/qbytearray_test.py
+++ b/tests/QtCore/qbytearray_test.py
@@ -148,6 +148,12 @@ class TestPickler(unittest.TestCase):
ba2 = pickle.loads(output.getvalue())
self.assertEqual(ba, ba2)
+class QByteArrayBug720(unittest.TestCase):
+ def testIt(self):
+ ba = QByteArray("32\"1\x00123")
+ self.assertEqual(str(ba), "32\"1\x00123")
+ self.assertEqual(repr(ba), "PySide.QtCore.QByteArray(\"32\\\"1\x00123\")")
+
if __name__ == '__main__':
unittest.main()