Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions tests/integration/dbapi/async/test_queries_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,15 +382,11 @@ async def test_multi_statement_query(connection: Connection) -> None:
" primary index i"
)

assert (
await c.execute(
"INSERT INTO test_tb_async_multi_statement values (1, 'a'), (2, 'b');"
"SELECT * FROM test_tb_async_multi_statement;"
"SELECT * FROM test_tb_async_multi_statement WHERE i <= 1"
)
== 1 # Insert always returns 1 row with num of rows modified
), "Invalid row count returned for insert"
assert c.rowcount == 1, "Invalid row count"
await c.execute(
"INSERT INTO test_tb_async_multi_statement values (1, 'a'), (2, 'b');"
"SELECT * FROM test_tb_async_multi_statement;"
"SELECT * FROM test_tb_async_multi_statement WHERE i <= 1"
)
assert c.description is None, "Invalid description"

assert await c.nextset()
Expand Down
14 changes: 5 additions & 9 deletions tests/integration/dbapi/sync/test_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,15 +327,11 @@ def test_multi_statement_query(connection: Connection) -> None:
"CREATE FACT TABLE test_tb_multi_statement(i int, s string) primary index i"
)

assert (
c.execute(
"INSERT INTO test_tb_multi_statement values (1, 'a'), (2, 'b');"
"SELECT * FROM test_tb_multi_statement;"
"SELECT * FROM test_tb_multi_statement WHERE i <= 1"
)
== 1 # Insert always returns 1 row with num of rows modified
), "Invalid row count returned for insert"
assert c.rowcount == 1, "Invalid row count"
c.execute(
"INSERT INTO test_tb_multi_statement values (1, 'a'), (2, 'b');"
"SELECT * FROM test_tb_multi_statement;"
"SELECT * FROM test_tb_multi_statement WHERE i <= 1"
)
assert c.description is None, "Invalid description"

assert c.nextset()
Expand Down