Skip to content

Improve pickle protocols coverage in test_slice  #100931

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

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    testsTests in the Lib/test dir
    on Jan 11, 2023
  2. self-assigned this
    on Jan 11, 2023
  3. added a commit that references this issue on Jan 11, 2023
  4. added a commit that references this issue on Jan 11, 2023
  5. added 2 commits that reference this issue on Jan 12, 2023
  6. added a commit that references this issue on Jan 12, 2023
  7. AlexWaygood commented on Jan 12, 2023

    @AlexWaygood
    Member

    Thanks!

  8. added a commit that references this issue on Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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