sorenisanerd / mock

Automatically exported from code.google.com/p/mock
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

It should be possible to set the return value of MagicMock.__iter__ to an iterable as well as an iterator #134

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The return value of MagicMock.__iter__ has to be an iterator, and it will be 
consumed when the mock is iterated over (so it can only be used once). It would 
be better to be able to set an iterable as well.

Original issue reported on code.google.com by fuzzyman on 12 Feb 2012 at 4:58

GoogleCodeExporter commented 9 years ago

Original comment by fuzzyman on 12 Feb 2012 at 5:23