Esempio n. 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
Esempio n. 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)
Esempio n. 3
0
async def test_begin():
    async with pg.begin() as conn:
        for row in await conn.fetch(query):
            assert row['a'] == 4.0
Esempio n. 4
0
async def test_begin():
    async with pg.begin() as conn:
        for row in await conn.fetch(query):
            assert row['a'] == 4.0