def test_await_only_no_greenlet(self): to_await = run1() with expect_raises_message( exc.InvalidRequestError, r"greenlet_spawn has not been called; can't call await_\(\) here.", ): await_only(to_await) # ensure no warning await_fallback(to_await)
def go(): await_fallback(inner_await())
async def inner_await(): nonlocal to_await to_await = run1() await_fallback(to_await)
def test_await_fallback_no_greenlet(self): to_await = run1() await_fallback(to_await)