You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed in #271, it's quite annoying that StopIteration is raised when an iterable side effect is exhausted.
In most cases, it's probably more reasonable to have the last entry repeated, which the docs has been adjusted (#287).
Since current behaviour is by design, to align with pythons already familiar built-in unittest Mock behaviour, we should find a way to opt-in for the new logic, e.g. by ..
.. providing a repeat_last utility to shortcut chain + repeat ..
As discussed in #271, it's quite annoying that
StopIteration
is raised when an iterable side effect is exhausted.In most cases, it's probably more reasonable to have the last entry repeated, which the docs has been adjusted (#287).
Since current behaviour is by design, to align with pythons already familiar built-in unittest
Mock
behaviour, we should find a way to opt-in for the new logic, e.g. by .... providing a
repeat_last
utility to shortcut chain + repeat .... or alter the api by adding an optional kwarg to
route.mock(..)
..I'm leaning towards the utility shortcut, as a first step.
The text was updated successfully, but these errors were encountered: