Make the test somewhat clearer (I hope).

This commit is contained in:
Thomas Heller 2008-02-13 20:36:51 +00:00
parent a06a1a88ee
commit 4516451aec
1 changed files with 4 additions and 4 deletions

View File

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