Exemple #1
0
    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)
Exemple #2
0
 def go():
     await_fallback(inner_await())
Exemple #3
0
 async def inner_await():
     nonlocal to_await
     to_await = run1()
     await_fallback(to_await)
Exemple #4
0
 def test_await_fallback_no_greenlet(self):
     to_await = run1()
     await_fallback(to_await)