TestNamedTuple.test_pickle was only testing through protocol 2. Changed to have it automatically test through the most recent version.

This commit is contained in:
Eric V. Smith 2014-02-05 10:33:14 -05:00
parent 456ab5d909
commit 4d5d69d452

View file

@ -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)