Skip to content

collections.abc.ValuesView is not sufficently tested #98512

Closed
@sobolevn

Description

@sobolevn

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

Metadata

Metadata

Assignees

Labels

stdlibPython modules in the Lib dirtestsTests in the Lib/test dir

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions