summaryrefslogtreecommitdiffstats
path: root/Lib/ctypes
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2008-02-13 20:36:51 (GMT)
committerThomas Heller <theller@ctypes.org>2008-02-13 20:36:51 (GMT)
commit4516451aeceb9463083664419b277d0851cc7160 (patch)
tree3c14d78e9eb091ea94804c64c2213cb0dec2c3d6 /Lib/ctypes
parenta06a1a88ee7c00a43e3bca2634c68aecd0170500 (diff)
downloadcpython-4516451aeceb9463083664419b277d0851cc7160.zip
cpython-4516451aeceb9463083664419b277d0851cc7160.tar.gz
cpython-4516451aeceb9463083664419b277d0851cc7160.tar.bz2
Make the test somewhat clearer (I hope).
Diffstat (limited to 'Lib/ctypes')
-rw-r--r--Lib/ctypes/test/test_pickling.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/ctypes/test/test_pickling.py b/Lib/ctypes/test/test_pickling.py
index 5355795..c7925c7 100644
--- a/Lib/ctypes/test/test_pickling.py
+++ b/Lib/ctypes/test/test_pickling.py
@@ -28,8 +28,8 @@ class PickleTest(unittest.TestCase):
]:
dst = self.loads(self.dumps(src))
self.failUnlessEqual(src.__dict__, dst.__dict__)
- self.failUnlessEqual(buffer(src),
- buffer(dst))
+ self.failUnlessEqual(buffer(src)[:],
+ buffer(dst)[:])
def test_struct(self):
X.init_called = 0
@@ -46,8 +46,8 @@ class PickleTest(unittest.TestCase):
# ctypes instances are identical when the instance __dict__
# and the memory buffer are identical
self.failUnlessEqual(y.__dict__, x.__dict__)
- self.failUnlessEqual(buffer(y),
- buffer(x))
+ self.failUnlessEqual(buffer(y)[:],
+ buffer(x)[:])
def test_unpickable(self):
# ctypes objects that are pointers or contain pointers are