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>
This commit is contained in:
Hugo Parente Lima 2011-04-06 15:59:01 -03:00
commit f3961387a9
2 changed files with 15 additions and 8 deletions

View file

@ -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()