How do you import
list_iterator instead of doing
I'm creating a
def assertIteratorEqual(self, iter_1, iter_2, msg=None, iter_type=None):
function, in parallel to the existing
def assertSequenceEqual(self, seq_1, seq_2, msg=None, seq_type=None):
Why would types still matter in this case? The iterator could be in a class, and there's a reason to test for that.
Why can't I just convert iterators to lists and test them? Some iterated results share resources, copying them upon each iteration would not be very efficient, so converting them to a list is not always possible.
Now, the actual reason I want a list iterator type is to have a convenient type to test for.