Skip to content

Commit ed96158

Browse files
authored
test: Remove insert rowcount test (#245)
1 parent 7ca1872 commit ed96158

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

tests/integration/dbapi/async/test_queries_async.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -382,15 +382,11 @@ async def test_multi_statement_query(connection: Connection) -> None:
382382
" primary index i"
383383
)
384384

385-
assert (
386-
await c.execute(
387-
"INSERT INTO test_tb_async_multi_statement values (1, 'a'), (2, 'b');"
388-
"SELECT * FROM test_tb_async_multi_statement;"
389-
"SELECT * FROM test_tb_async_multi_statement WHERE i <= 1"
390-
)
391-
== 1 # Insert always returns 1 row with num of rows modified
392-
), "Invalid row count returned for insert"
393-
assert c.rowcount == 1, "Invalid row count"
385+
await c.execute(
386+
"INSERT INTO test_tb_async_multi_statement values (1, 'a'), (2, 'b');"
387+
"SELECT * FROM test_tb_async_multi_statement;"
388+
"SELECT * FROM test_tb_async_multi_statement WHERE i <= 1"
389+
)
394390
assert c.description is None, "Invalid description"
395391

396392
assert await c.nextset()

tests/integration/dbapi/sync/test_queries.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -327,15 +327,11 @@ def test_multi_statement_query(connection: Connection) -> None:
327327
"CREATE FACT TABLE test_tb_multi_statement(i int, s string) primary index i"
328328
)
329329

330-
assert (
331-
c.execute(
332-
"INSERT INTO test_tb_multi_statement values (1, 'a'), (2, 'b');"
333-
"SELECT * FROM test_tb_multi_statement;"
334-
"SELECT * FROM test_tb_multi_statement WHERE i <= 1"
335-
)
336-
== 1 # Insert always returns 1 row with num of rows modified
337-
), "Invalid row count returned for insert"
338-
assert c.rowcount == 1, "Invalid row count"
330+
c.execute(
331+
"INSERT INTO test_tb_multi_statement values (1, 'a'), (2, 'b');"
332+
"SELECT * FROM test_tb_multi_statement;"
333+
"SELECT * FROM test_tb_multi_statement WHERE i <= 1"
334+
)
339335
assert c.description is None, "Invalid description"
340336

341337
assert c.nextset()

0 commit comments

Comments
 (0)