mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
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:
parent
456ab5d909
commit
4d5d69d452
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue