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))
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.
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.