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

Method test_athrow

Lib/test/test_asyncgen.py:2031–2039  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2029
2030 @unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: RuntimeWarning not triggered
2031 def test_athrow(self):
2032 async def gen():
2033 yield 1
2034
2035 msg = f"coroutine method 'athrow' of '{gen.__qualname__}' was never awaited"
2036 with self.assertWarnsRegex(RuntimeWarning, msg):
2037 g = gen()
2038 g.athrow(RuntimeError)
2039 gc_collect()
2040
2041 @unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: RuntimeWarning not triggered
2042 def test_aclose(self):

Callers

nothing calls this directly

Calls 4

gc_collectFunction · 0.90
assertWarnsRegexMethod · 0.80
genFunction · 0.70
athrowMethod · 0.45

Tested by

no test coverage detected