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

Method test_throw

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

Source from the content-addressed store, hash-verified

680 test_send()
681
682 async def test_throw():
683 p = ait_class()
684 obj = anext(p, "completed")
685 self.assertRaises(SyntaxError, obj.throw, SyntaxError)
686 return "completed"
687
688 result = self.loop.run_until_complete(test_throw())
689 self.assertEqual(result, "completed")

Callers

nothing calls this directly

Calls 2

anextFunction · 0.85
assertRaisesMethod · 0.45

Tested by

no test coverage detected