From: Thomas Heller Date: Wed, 13 Feb 2008 20:36:51 +0000 (+0000) Subject: Make the test somewhat clearer (I hope). X-Git-Tag: v2.6a1~180 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4516451aeceb9463083664419b277d0851cc7160;p=thirdparty%2FPython%2Fcpython.git Make the test somewhat clearer (I hope). --- diff --git a/Lib/ctypes/test/test_pickling.py b/Lib/ctypes/test/test_pickling.py index 53557951e6e9..c7925c7ac783 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