git reimport

This commit is contained in:
2019-03-15 15:02:19 +04:00
commit 742797309a
90 changed files with 4411 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
import pytest
from zvk.util.zlogging import logger
@pytest.mark.asyncio
async def test_async_gen():
async def f1():
logger.info('hi 1')
async def f2():
logger.info('hi 2')
yield 1
async def f3():
logger.info('hi 3')
if False:
yield 1
with pytest.raises(Exception):
async for i in f1():
assert i == 1
async for i in f2():
assert i == 1
async for i in f3():
assert i == 1