summaryrefslogtreecommitdiff
path: root/Lib/test/test_collections.py
diff options
context:
space:
mode:
authorEric V. Smith <eric@trueblade.com>2014-02-05 10:33:14 -0500
committerEric V. Smith <eric@trueblade.com>2014-02-05 10:33:14 -0500
commit4d5d69d452d37bfc29d8f182cb4b99a344f0dadb (patch)
treee0e392cc98d2c89b98a8a3e895e6f4c285b9efd5 /Lib/test/test_collections.py
parent456ab5d90941962973bed0cf2a3ec0e1c32b046b (diff)
downloadcpython-git-4d5d69d452d37bfc29d8f182cb4b99a344f0dadb.tar.gz
TestNamedTuple.test_pickle was only testing through protocol 2. Changed to have it automatically test through the most recent version.
Diffstat (limited to 'Lib/test/test_collections.py')
-rw-r--r--Lib/test/test_collections.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py
index 56e8120705..ee28a6c0b3 100644
--- a/Lib/test/test_collections.py
+++ b/Lib/test/test_collections.py
@@ -301,7 +301,7 @@ class TestNamedTuple(unittest.TestCase):
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)