Skip to content

Commit fe98dd1

Browse files
committed
Add SQLAlchemy .in_ operator test case for #577
1 parent ab13f94 commit fe98dd1

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

tests/sa/test_sa_connection.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,3 +466,17 @@ async def test_async_iter(sa_connect):
466466
async for row in conn.execute(tbl.select()):
467467
ret.append(row)
468468
assert [(1, "first"), (2, "second")] == ret
469+
470+
471+
@pytest.mark.run_loop
472+
async def test_statement_in(sa_connect):
473+
conn = await sa_connect()
474+
await conn.execute(tbl.insert().values(name="second"))
475+
await conn.execute(tbl.insert().values(name="third"))
476+
477+
stmt = tbl.select().where(tbl.c.id.in_([1, 2]))
478+
479+
ret = []
480+
async for row in conn.execute(stmt):
481+
ret.append(row)
482+
assert [(1, "first"), (2, "second")] == ret

0 commit comments

Comments
 (0)