Skip to content

Commit f420fc6

Browse files
committed
fix: check connection_get_table_schema properly
1 parent e555f95 commit f420fc6

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

adbc_drivers_validation/tests/query.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ def generate_tests(all_quirks: list[model.DriverQuirks], metafunc) -> None:
4141

4242
for quirks in all_quirks:
4343
driver_param = f"{quirks.name}:{quirks.short_version}"
44+
45+
flags = {
46+
"test_execute_schema": quirks.features.statement_execute_schema,
47+
"test_get_table_schema": quirks.features.connection_get_table_schema,
48+
}
49+
4450
for query in quirks.query_set.queries.values():
4551
marks = []
4652
marks.extend(query.pytest_marks)
@@ -52,16 +58,13 @@ def generate_tests(all_quirks: list[model.DriverQuirks], metafunc) -> None:
5258
):
5359
marks.append(pytest.mark.skip(reason="bind not supported"))
5460

55-
if metafunc.definition.name in {
56-
"test_execute_schema",
57-
"test_get_table_schema",
58-
}:
61+
if metafunc.definition.name in flags:
5962
if not isinstance(query.query, model.SelectQuery):
6063
continue
6164
if not query.name.startswith("type/select/"):
6265
# There's no need to repeat this test multiple times per type
6366
continue
64-
if not quirks.features.statement_execute_schema:
67+
if not flags[metafunc.definition.name]:
6568
marks.append(pytest.mark.skip(reason="not implemented"))
6669
elif metafunc.definition.name == "test_query":
6770
if not isinstance(query.query, model.SelectQuery):

0 commit comments

Comments
 (0)