]> granicus.if.org Git - python/commitdiff
Temporary hacks to arrange that the pickle tests relying on protocol 2
authorTim Peters <tim.peters@gmail.com>
Tue, 28 Jan 2003 22:34:11 +0000 (22:34 +0000)
committerTim Peters <tim.peters@gmail.com>
Tue, 28 Jan 2003 22:34:11 +0000 (22:34 +0000)
only get run by test_pickle.py now (& not by test_cpickle.py).  This
should be undone when protocol 2 is implemented in cPickle too.
test_cpickle should pass again.

Lib/test/pickletester.py
Lib/test/test_pickle.py

index 36b3702d123bfabb3cbe2e5161ae403ba4c39443..1736c12657109fa47c18c8aafae8ca9c17395654 100644 (file)
@@ -324,6 +324,12 @@ class AbstractPickleTests(unittest.TestCase):
 ##         print
 ##         pickletools.dis(s)
 
+# 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
index 24052b5a1339828b8fc7f4412aff118345b1a50d..d30e0848e14c8e8f3ffe679a114ae594520d7244 100644 (file)
@@ -1,11 +1,15 @@
 import pickle
 import unittest
 from cStringIO import StringIO
-from test.pickletester import AbstractPickleTests, AbstractPickleModuleTests, \
-     AbstractPersistentPicklerTests
+
 from test import test_support
 
-class PickleTests(AbstractPickleTests, AbstractPickleModuleTests):
+from test.pickletester import AbstractPickleTests
+from test.pickletester import TempAbstractPickleTests as XXXTemp
+from test.pickletester import AbstractPickleModuleTests
+from test.pickletester import AbstractPersistentPicklerTests
+
+class PickleTests(AbstractPickleTests, AbstractPickleModuleTests, XXXTemp):
 
     def setUp(self):
         self.dumps = pickle.dumps