[New-bugs-announce] [issue38859] AsyncMock says it raises StopIteration but that is Impossible

Jason Fried report at bugs.python.org
Tue Nov 19 19:14:29 EST 2019


New submission from Jason Fried <me at jasonfried.info>:

If an AsyncMock uses a side_effect that is an Iterable, if called more than items exist its suppose to raise StopIteration according to the docs but PEP 479 says that is impossible. 

My Suggestion is that we update the docs and the code to Raise a StopAsyncIteration since it will not be converted to a RuntimeError

----------
components: Library (Lib)
messages: 357008
nosy: fried, lisroach
priority: normal
severity: normal
status: open
title: AsyncMock says it raises StopIteration but that is Impossible
type: behavior
versions: Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38859>
_______________________________________


More information about the New-bugs-announce mailing list