import asyncio
import traceback
import unittest


def async_test(f):
    def wrapper(test_case: unittest.TestCase, *args, **kwargs):
        loop = asyncio.get_event_loop()
        task = loop.create_task(f(test_case, *args, **kwargs))
        try:
            loop.run_until_complete(task)
        except Exception:
            traceback.print_exc()
            raise

    return wrapper

[((8, 15, 8, 39), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ({}, {}), '()', False, 'import asyncio\n'), ((13, 12, 13, 33), 'traceback.print_exc', 'traceback.print_exc', ({}, {}), '()', False, 'import traceback\n')]