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
Describe the bug
When I run two (or more) async iterators in async for loops, the second loop will have incorrect branch coverage.
To Reproduce
Here's an example:
import asyncio
class AsyncIter:
def __init__(self, items):
self.items = items
async def __aiter__(self):
for i in self.items:
yield i
async def test():
async for i in AsyncIter([1, 2, 3]):
pass
async for i in AsyncIter([1, 2, 3]):
pass
asyncio.run(test())
Describe the bug
When I run two (or more) async iterators in
async for
loops, the second loop will have incorrect branch coverage.To Reproduce
Here's an example:
And the result:
I'm running Coverage 5.5 on Python 3.9 (debug sys output here)
Expected behavior
Same as the non-async version:
The text was updated successfully, but these errors were encountered: