MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_async_for

Method test_async_for

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

Source from the content-addressed store, hash-verified

1005 recorders = self.exception_recorders)
1006
1007 def test_async_for(self):
1008
1009 def func():
1010
1011 async def async_generator():
1012 for i in range(1):
1013 raise ZeroDivisionError
1014 yield i
1015
1016 async def async_loop():
1017 try:
1018 async for item in async_generator():
1019 pass
1020 except Exception:
1021 pass
1022
1023 try:
1024 async_loop().send(None)
1025 except StopIteration:
1026 pass
1027
1028 self.check_balanced(
1029 func,
1030 recorders = self.exception_recorders)
1031
1032 def test_throw(self):
1033

Callers

nothing calls this directly

Calls 1

check_balancedMethod · 0.80

Tested by

no test coverage detected