mirror of
https://github.com/python/cpython.git
synced 2025-11-11 22:55:08 +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,):
|
for module in (pickle,):
|
||||||
loads = getattr(module, 'loads')
|
loads = getattr(module, 'loads')
|
||||||
dumps = getattr(module, 'dumps')
|
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))
|
q = loads(dumps(p, protocol))
|
||||||
self.assertEqual(p, q)
|
self.assertEqual(p, q)
|
||||||
self.assertEqual(p._fields, q._fields)
|
self.assertEqual(p._fields, q._fields)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue