MCPcopy Index your code
hub / github.com/python/cpython / test_async_for

Method test_async_for

Lib/test/test_monitoring.py:1000–1023  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

998 recorders = self.exception_recorders)
999
1000 def test_async_for(self):
1001
1002 def func():
1003
1004 async def async_generator():
1005 for i in range(1):
1006 raise ZeroDivisionError
1007 yield i
1008
1009 async def async_loop():
1010 try:
1011 async for item in async_generator():
1012 pass
1013 except Exception:
1014 pass
1015
1016 try:
1017 async_loop().send(None)
1018 except StopIteration:
1019 pass
1020
1021 self.check_balanced(
1022 func,
1023 recorders = self.exception_recorders)
1024
1025 def test_throw(self):
1026

Callers

nothing calls this directly

Calls 1

check_balancedMethod · 0.80

Tested by

no test coverage detected