Skip to content

Commit 67b9900

Browse files
committed
fix test
1 parent 4f49794 commit 67b9900

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

tests/fast/test_insert.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ def test_insert_with_schema(self, duckdb_cursor):
2727
res = duckdb_cursor.table("not_main.tbl").fetchall()
2828
assert len(res) == 10
2929

30-
# TODO: This is not currently supported # noqa: TD002, TD003
31-
with pytest.raises(duckdb.CatalogException, match="Table with name tbl does not exist"):
32-
duckdb_cursor.table("not_main.tbl").insert([42, 21, 1337])
30+
# Insert into a schema-qualified table should work; table has a single column from range(10)
31+
duckdb_cursor.table("not_main.tbl").insert([42])
32+
res2 = duckdb_cursor.table("not_main.tbl").fetchall()
33+
assert len(res2) == 11
34+
assert (42,) in res2

tests/fast/test_relation.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,11 @@ def test_value_relation(self, duckdb_cursor):
280280
rel = duckdb_cursor.values((const(1), const(2), const(3)), const(4))
281281

282282
# Using Expressions that can't be resolved:
283-
with pytest.raises(duckdb.BinderException, match='Referenced column "a" not found in FROM clause!'):
283+
# Accept both historical and current Binder error message variants
284+
with pytest.raises(
285+
duckdb.BinderException,
286+
match=r'Referenced column "a" not found in FROM clause!|Referenced column "a" was not found because the FROM clause is missing',
287+
):
284288
duckdb_cursor.values(duckdb.ColumnExpression("a"))
285289

286290
def test_insert_into_operator(self):

0 commit comments

Comments
 (0)