-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix return typing of AsyncEngine._trans_ctx.__aenter__ * StartableContext is made generic as to remove the assumption that it'll always be returning itself which is not the case for for it's behaviour in _trans_ctx * tests: add testcase for #109 Co-authored-by: Faster Speeding <luke@lmbyrne.dev>
- Loading branch information
1 parent
424b378
commit f761e14
Showing
4 changed files
with
25 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from sqlalchemy import literal | ||
from sqlalchemy import select | ||
from sqlalchemy.ext import asyncio | ||
|
||
|
||
async def test() -> None: | ||
database = asyncio.create_async_engine("", future=True) | ||
|
||
trans_ctx = database.begin() | ||
async with trans_ctx as connection: | ||
await connection.execute(select(literal(1))) |