Skip to content

Improve pickle protocols coverage in test_slice  #100931

Closed
@sobolevn

Description

@sobolevn

While working on #100817 I've noticed that slice is only tested with 3 pickle protocols. See

def test_pickle(self):
s = slice(10, 20, 3)
for protocol in (0,1,2):
t = loads(dumps(s, protocol))
self.assertEqual(s, t)
self.assertEqual(s.indices(15), t.indices(15))
self.assertNotEqual(id(s), id(t))
I don't think we need to limited supported protocols. Let's test all protocols!

Linked PRs

Metadata

Metadata

Assignees

Labels

testsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions