aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/prompt-toolkit/py3/tests/test_async_generator.py
diff options
context:
space:
mode:
authormonster <monster@ydb.tech>2022-07-07 14:41:37 +0300
committermonster <monster@ydb.tech>2022-07-07 14:41:37 +0300
commit06e5c21a835c0e923506c4ff27929f34e00761c2 (patch)
tree75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /contrib/python/prompt-toolkit/py3/tests/test_async_generator.py
parent03f024c4412e3aa613bb543cf1660176320ba8f4 (diff)
downloadydb-06e5c21a835c0e923506c4ff27929f34e00761c2.tar.gz
fix ya.make
Diffstat (limited to 'contrib/python/prompt-toolkit/py3/tests/test_async_generator.py')
-rw-r--r--contrib/python/prompt-toolkit/py3/tests/test_async_generator.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/contrib/python/prompt-toolkit/py3/tests/test_async_generator.py b/contrib/python/prompt-toolkit/py3/tests/test_async_generator.py
deleted file mode 100644
index fd2c109c955..00000000000
--- a/contrib/python/prompt-toolkit/py3/tests/test_async_generator.py
+++ /dev/null
@@ -1,24 +0,0 @@
-from prompt_toolkit.eventloop import generator_to_async_generator, get_event_loop
-
-
-def _sync_generator():
- yield 1
- yield 10
-
-
-def test_generator_to_async_generator():
- """
- Test conversion of sync to asycn generator.
- This should run the synchronous parts in a background thread.
- """
- async_gen = generator_to_async_generator(_sync_generator)
-
- items = []
-
- async def consume_async_generator():
- async for item in async_gen:
- items.append(item)
-
- # Run the event loop until all items are collected.
- get_event_loop().run_until_complete(consume_async_generator())
- assert items == [1, 10]