[Python-checkins] python/dist/src/Lib/test pickletester.py,1.45,1.46
tim_one@users.sourceforge.net
tim_one@users.sourceforge.net
Tue, 11 Feb 2003 13:06:53 -0800
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv25679/python/Lib/test
Modified Files:
pickletester.py
Log Message:
Implemented list batching in cPickle.
Index: pickletester.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/pickletester.py,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** pickletester.py 11 Feb 2003 16:40:16 -0000 1.45
--- pickletester.py 11 Feb 2003 21:06:15 -0000 1.46
***************
*** 673,693 ****
self.produce_global_ext(0x12abcdef, pickle.EXT4) # check endianness
- # XXX Temporary hack, so long as the C implementation of pickle protocol
- # XXX 2 isn't ready. When it is, move the methods in TempAbstractPickleTests
- # XXX into AbstractPickleTests above, and get rid of TempAbstractPickleTests
- # XXX along with the references to it in test_pickle.py.
- class TempAbstractPickleTests(unittest.TestCase):
-
- def test_newobj_list_slots(self):
- x = SlotList([1, 2, 3])
- x.foo = 42
- x.bar = "hello"
- s = self.dumps(x, 2)
- y = self.loads(s)
- self.assertEqual(list(x), list(y))
- self.assertEqual(x.__dict__, y.__dict__)
- self.assertEqual(x.foo, y.foo)
- self.assertEqual(x.bar, y.bar)
-
def test_list_chunking(self):
n = 10 # too small to chunk
--- 673,676 ----
***************
*** 711,714 ****
--- 694,714 ----
else:
self.failUnless(num_appends >= 2)
+
+ # XXX Temporary hack, so long as the C implementation of pickle protocol
+ # XXX 2 isn't ready. When it is, move the methods in TempAbstractPickleTests
+ # XXX into AbstractPickleTests above, and get rid of TempAbstractPickleTests
+ # XXX along with the references to it in test_pickle.py.
+ class TempAbstractPickleTests(unittest.TestCase):
+
+ def test_newobj_list_slots(self):
+ x = SlotList([1, 2, 3])
+ x.foo = 42
+ x.bar = "hello"
+ s = self.dumps(x, 2)
+ y = self.loads(s)
+ self.assertEqual(list(x), list(y))
+ self.assertEqual(x.__dict__, y.__dict__)
+ self.assertEqual(x.foo, y.foo)
+ self.assertEqual(x.bar, y.bar)
def test_dict_chunking(self):