From 4516451aeceb9463083664419b277d0851cc7160 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Wed, 13 Feb 2008 20:36:51 +0000 Subject: [PATCH] Make the test somewhat clearer (I hope). --- Lib/ctypes/test/test_pickling.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Lib/ctypes/test/test_pickling.py b/Lib/ctypes/test/test_pickling.py index 53557951e6e..c7925c7ac78 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