[Python-checkins] cpython: TestNamedTuple.test_pickle was only testing through protocol 2. Changed to have
eric.smith
python-checkins at python.org
Wed Feb 5 16:33:24 CET 2014
http://hg.python.org/cpython/rev/3dcbf8f928ec
changeset: 88973:3dcbf8f928ec
user: Eric V. Smith <eric at trueblade.com>
date: Wed Feb 05 10:33:14 2014 -0500
summary:
TestNamedTuple.test_pickle was only testing through protocol 2. Changed to have it automatically test through the most recent version.
files:
Lib/test/test_collections.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py
--- a/Lib/test/test_collections.py
+++ b/Lib/test/test_collections.py
@@ -301,7 +301,7 @@
for module in (pickle,):
loads = getattr(module, 'loads')
dumps = getattr(module, 'dumps')
- for protocol in -1, 0, 1, 2:
+ for protocol in range(-1, module.HIGHEST_PROTOCOL + 1):
q = loads(dumps(p, protocol))
self.assertEqual(p, q)
self.assertEqual(p._fields, q._fields)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list