Skip to content

Automatically convert Iterators #12

@bblommers

Description

@bblommers

If we pass in an iterator to the match_object-method, it is converted to an empty dictionary during serialization.

It would make more sense if we explicitly converted this to a list instead.

x: Iterator = some_method_returning an iterator()

snapshot.match_object("list_of_objects", x)

The current workaround is to always explicitly convert to a list, but it would be nicer (and less error-prone) if this library handles it for us.

x: Iterator = some_method_returning an iterator()

snapshot.match_object("list_of_objects", list(x))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions