summaryrefslogtreecommitdiffstats
path: root/tests/QtCore/qbytearray_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtCore/qbytearray_test.py')
-rw-r--r--tests/QtCore/qbytearray_test.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/QtCore/qbytearray_test.py b/tests/QtCore/qbytearray_test.py
index 34dc42f..f031332 100644
--- a/tests/QtCore/qbytearray_test.py
+++ b/tests/QtCore/qbytearray_test.py
@@ -4,6 +4,8 @@
import unittest
import ctypes
import sys
+import pickle
+import cStringIO
from PySide.QtCore import *
@@ -109,5 +111,14 @@ class QByteArrayBug514(unittest.TestCase):
self.assertEqual(type(a), QByteArray)
self.assertEqual(a.data(), data)
+class TestPickler(unittest.TestCase):
+ def testIt(self):
+ ba = QByteArray("321\x00123")
+ output = cStringIO.StringIO()
+ pickle.dump(ba, output)
+ ba2 = pickle.loads(output.getvalue())
+ self.assertEqual(ba, ba2)
+
+
if __name__ == '__main__':
unittest.main()