]> granicus.if.org Git - python/commitdiff
Test future pickle protocols. Thanks Antoine Pitrou for suggestion.
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>
Wed, 23 Jun 2010 22:29:48 +0000 (22:29 +0000)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>
Wed, 23 Jun 2010 22:29:48 +0000 (22:29 +0000)
Lib/test/test_datetime.py

index 7048a11d24fd3d8717c970c1f1ae57b86af514a0..f1b4ecf93a18ac220b9c988d18fefde2c10867ec 100644 (file)
@@ -19,8 +19,9 @@ from datetime import timezone
 from datetime import date, datetime
 import time as _time
 
-pickle_choices = [(pickle, pickle, proto) for proto in range(4)]
-assert len(pickle_choices) == 4
+pickle_choices = [(pickle, pickle, proto)
+                  for proto in range(pickle.HIGHEST_PROTOCOL + 1)]
+assert len(pickle_choices) == pickle.HIGHEST_PROTOCOL + 1
 
 # An arbitrary collection of objects of non-datetime types, for testing
 # mixed-type comparisons.