[Zope3-checkins] CVS: Zope3/src/datetime/tests - test_datetime.py:1.30

Tim Peters tim.one@comcast.net
Wed, 5 Feb 2003 17:30:09 -0500


Update of /cvs-repository/Zope3/src/datetime/tests
In directory cvs.zope.org:/tmp/cvs-serv8702/src/datetime/tests

Modified Files:
	test_datetime.py 
Log Message:
Bring the pickle tests into synch w/ Python 2.3 CVS.


=== Zope3/src/datetime/tests/test_datetime.py 1.29 => 1.30 ===
--- Zope3/src/datetime/tests/test_datetime.py:1.29	Fri Jan 31 22:24:44 2003
+++ Zope3/src/datetime/tests/test_datetime.py	Wed Feb  5 17:30:06 2003
@@ -14,21 +14,12 @@
 from datetime import time
 from datetime import date, datetime
 
-
-pickle_choices = [
-    (pickle, pickle, 0),
-    (pickle, pickle, 1),
-    (pickle, pickle, 2),
-    (cPickle, cPickle, 0),
-    (cPickle, cPickle, 1),
-##    (cPickle, cPickle, 2),
-    (pickle, cPickle, 0),
-    (pickle, cPickle, 1),
-##    (pickle, cPickle, 2),
-    (cPickle, pickle, 0),
-    (cPickle, pickle, 1),
-##    (cPickle, pickle, 2),
-    ]
+# Before Python 2.3, proto=2 was taken as a synonym for proto=1.
+pickle_choices = [(pickler, unpickler, proto)
+                  for pickler in pickle, cPickle
+                  for unpickler in pickle, cPickle
+                  for proto in range(3)]
+assert len(pickle_choices) == 2*2*3
 
 
 # XXX The test suite uncovered a bug in Python 2.2.2:  if x and y are