diff options
Diffstat (limited to 'tests/functional/not_async_context_manager_py37.py')
-rw-r--r-- | tests/functional/not_async_context_manager_py37.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/functional/not_async_context_manager_py37.py b/tests/functional/not_async_context_manager_py37.py new file mode 100644 index 000000000..705e5afc9 --- /dev/null +++ b/tests/functional/not_async_context_manager_py37.py @@ -0,0 +1,12 @@ +# pylint: disable=missing-docstring + +from contextlib import asynccontextmanager + + +@asynccontextmanager +async def context_manager(value): + yield value + + +async with context_manager(42) as ans: + assert ans == 42 |