def METHOD_NAME(self):
    T = None
    async def foo():
        f = T.get_stack(limit=1)
        try:
            self.assertEqual(f[0].f_code.co_name, 'foo')
        finally:
            f = None
    async def runner():
        nonlocal T
        T = asyncio.ensure_future(foo(), loop=self.loop)
        await T
    self.loop.run_until_complete(runner())