(self)
| 1053 | run_async(foo()) |
| 1054 | |
| 1055 | def test_await_9(self): |
| 1056 | def wrap(): |
| 1057 | return bar |
| 1058 | |
| 1059 | async def bar(): |
| 1060 | return 42 |
| 1061 | |
| 1062 | async def foo(): |
| 1063 | db = {'b': lambda: wrap} |
| 1064 | |
| 1065 | class DB: |
| 1066 | b = wrap |
| 1067 | |
| 1068 | return (await bar() + await wrap()() + await db['b']()()() + |
| 1069 | await bar() * 1000 + await DB.b()()) |
| 1070 | |
| 1071 | async def foo2(): |
| 1072 | return -await bar() |
| 1073 | |
| 1074 | self.assertEqual(run_async(foo()), ([], 42168)) |
| 1075 | self.assertEqual(run_async(foo2()), ([], -42)) |
| 1076 | |
| 1077 | def test_await_10(self): |
| 1078 | async def baz(): |
nothing calls this directly
no test coverage detected