From 33b94c9fa9f10405cf52e825d71c9ffda7edc186 Mon Sep 17 00:00:00 2001 From: Alexander Belopolsky Date: Wed, 23 Jun 2010 22:29:48 +0000 Subject: [PATCH] Test future pickle protocols. Thanks Antoine Pitrou for suggestion. --- Lib/test/test_datetime.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_datetime.py b/Lib/test/test_datetime.py index 7048a11d24..f1b4ecf93a 100644 --- a/Lib/test/test_datetime.py +++ b/Lib/test/test_datetime.py @@ -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. -- 2.40.0