Kaydet (Commit) 4d5d69d4 authored tarafından Eric V. Smith's avatar Eric V. Smith

TestNamedTuple.test_pickle was only testing through protocol 2. Changed to have…

TestNamedTuple.test_pickle was only testing through protocol 2. Changed to have it automatically test through the most recent version.
üst 456ab5d9
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment