From 4d5d69d452d37bfc29d8f182cb4b99a344f0dadb Mon Sep 17 00:00:00 2001 From: "Eric V. Smith" Date: Wed, 5 Feb 2014 10:33:14 -0500 Subject: TestNamedTuple.test_pickle was only testing through protocol 2. Changed to have it automatically test through the most recent version. --- Lib/test/test_collections.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py index 56e8120..ee28a6c 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) -- cgit v0.12