Skip to content

collections.abc.ValuesView is not sufficently tested #98512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sobolevn opened this issue Oct 21, 2022 · 1 comment
Closed

collections.abc.ValuesView is not sufficently tested #98512

sobolevn opened this issue Oct 21, 2022 · 1 comment
Assignees
Labels
stdlib Python modules in the Lib dir tests Tests in the Lib/test dir

Comments

@sobolevn
Copy link
Member

sobolevn commented Oct 21, 2022

There are places where it is either not complete:

self.assertIsInstance(d.values(), collections.abc.ValuesView)
self.assertIsInstance(d.values(), collections.abc.MappingView)
self.assertIsInstance(d.values(), collections.abc.Sized)

Not base classes are covered here. But, I guess it should be.

Or there are places where it is not tested at all:

self.assertIsInstance(mymap.keys(), Set)
self.assertIsInstance(mymap.keys(), KeysView)
self.assertIsInstance(mymap.items(), Set)
self.assertIsInstance(mymap.items(), ItemsView)

I will go through places like this and cover ValuesView.
Noticed while working on #98511

@sobolevn sobolevn added tests Tests in the Lib/test dir stdlib Python modules in the Lib dir labels Oct 21, 2022
@sobolevn sobolevn self-assigned this Oct 21, 2022
sobolevn added a commit to sobolevn/cpython that referenced this issue Oct 21, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Nov 3, 2022
(cherry picked from commit 29e027c)

Co-authored-by: Nikita Sobolev <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Nov 3, 2022
(cherry picked from commit 29e027c)

Co-authored-by: Nikita Sobolev <[email protected]>
miss-islington added a commit that referenced this issue Nov 3, 2022
(cherry picked from commit 29e027c)

Co-authored-by: Nikita Sobolev <[email protected]>
miss-islington added a commit that referenced this issue Nov 3, 2022
(cherry picked from commit 29e027c)

Co-authored-by: Nikita Sobolev <[email protected]>
@hauntsaninja
Copy link
Contributor

Thanks, looks like this is completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir tests Tests in the Lib/test dir
Projects
None yet
Development

No branches or pull requests

2 participants