Пример #1
0
async def test_begin():
    await _init()

    async with pg.begin() as conn:
        for row in await conn.fetch(query):
            assert row.a == 4.0
Пример #2
0
 async def inner(connection=None, **kwargs):
     if connection is not None:
         return await func(connection=connection, **kwargs)
     async with pg.begin() as conn:
         return await func(connection=conn, **kwargs)
Пример #3
0
async def test_begin():
    async with pg.begin() as conn:
        for row in await conn.fetch(query):
            assert row['a'] == 4.0
Пример #4
0
async def test_begin():
    async with pg.begin() as conn:
        for row in await conn.fetch(query):
            assert row['a'] == 4.0