Skip to content

Commit 2f3a245

Browse files
committed
fix failing ci
1 parent bceb3a4 commit 2f3a245

4 files changed

Lines changed: 12 additions & 10 deletions

File tree

tests/fast/adbc/test_statement_bind.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,6 @@ def test_not_enough_parameters(self):
191191
statement.bind(array, schema)
192192
with pytest.raises(
193193
adbc_driver_manager.ProgrammingError,
194-
match="Values were not provided for the following prepared statement parameters: 2",
194+
match="Values were not provided for the following parameters: 2",
195195
):
196196
statement.execute_query()

tests/fast/api/test_duckdb_connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def test_pystatement(self):
157157

158158
with pytest.raises(
159159
duckdb.InvalidInputException,
160-
match="Values were not provided for the following prepared statement parameters: 1",
160+
match="Values were not provided for the following parameters: 1",
161161
):
162162
duckdb.execute(statements[0])
163163
assert duckdb.execute(statements[0], {"1": 42}).fetchall() == [(42,)]

tests/fast/api/test_duckdb_query.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,12 @@ def test_named_param(self):
9191
def test_named_param_not_dict(self):
9292
con = duckdb.connect()
9393

94-
# The missing-parameter names come from an unordered set, so their order is not stable; match all three
95-
# regardless of order.
94+
# Passing a list binds positionally as $1, $2, $3, which are excess against the named parameters in the
95+
# query. The excess-parameter names come from an unordered set, so their order is not stable; match all
96+
# three regardless of order.
9697
with pytest.raises(
9798
duckdb.InvalidInputException,
98-
match=r"prepared statement parameters: (?=.*\bname1\b)(?=.*\bname2\b)(?=.*\bname3\b)",
99+
match=r"excess parameters: (?=.*\b1\b)(?=.*\b2\b)(?=.*\b3\b)",
99100
):
100101
con.execute("select $name1, $name2, $name3", ["name1", "name2", "name3"])
101102

@@ -112,7 +113,7 @@ def test_named_param_not_exhaustive(self):
112113

113114
with pytest.raises(
114115
duckdb.InvalidInputException,
115-
match="Invalid Input Error: Values were not provided for the following prepared statement parameters: name3", # noqa: E501
116+
match="Invalid Input Error: Values were not provided for the following parameters: name3",
116117
):
117118
con.execute("select $name1, $name2, $name3", {"name1": 5, "name2": 3})
118119

@@ -121,17 +122,18 @@ def test_named_param_excessive(self):
121122

122123
with pytest.raises(
123124
duckdb.InvalidInputException,
124-
match="Values were not provided for the following prepared statement parameters: name3",
125+
match="Parameter argument/count mismatch, identifiers of the excess parameters: not_a_named_param",
125126
):
126127
con.execute("select $name1, $name2, $name3", {"name1": 5, "name2": 3, "not_a_named_param": 5})
127128

128129
def test_named_param_not_named(self):
129130
con = duckdb.connect()
130131

131-
# Unordered set: match both missing parameters regardless of order.
132+
# Passing a dict for positional parameters makes name1/name2 excess. Unordered set: match both excess
133+
# parameters regardless of order.
132134
with pytest.raises(
133135
duckdb.InvalidInputException,
134-
match=r"prepared statement parameters: (?=.*\b1\b)(?=.*\b2\b)",
136+
match=r"excess parameters: (?=.*\bname1\b)(?=.*\bname2\b)",
135137
):
136138
con.execute("select $1, $1, $2", {"name1": 5, "name2": 3})
137139

tests/fast/test_runtime_error.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def test_conn_prepared_statement_error(self):
120120
conn.execute("create table integers (a integer, b integer)")
121121
with pytest.raises(
122122
duckdb.InvalidInputException,
123-
match="Values were not provided for the following prepared statement parameters: 2",
123+
match="Values were not provided for the following parameters: 2",
124124
):
125125
conn.execute("select * from integers where a =? and b=?", [1])
126126

0 commit comments

Comments
 (0)