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

Method do_test

Lib/test/test_asyncgen.py:843–850  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

841 def __anext__(self):
842 return RaisingAwaitable()
843 async def do_test():
844 awaitable = anext(WithRaisingAwaitableAnext())
845 with self.assertRaises(ZeroDivisionError):
846 await awaitable
847 awaitable = anext(WithRaisingAwaitableAnext(), "default")
848 with self.assertRaises(ZeroDivisionError):
849 await awaitable
850 return "completed"
851 result = self.loop.run_until_complete(do_test())
852 self.assertEqual(result, "completed")
853

Callers

nothing calls this directly

Calls 3

anextFunction · 0.85
assertRaisesMethod · 0.45

Tested by

no test coverage detected