From 75f7160dedfb318d9a7e5c85eb5aaeeaed3e68a5 Mon Sep 17 00:00:00 2001 From: Elliana May Date: Fri, 10 Jan 2025 12:45:28 +0800 Subject: [PATCH] chore: update schema names test for nightly --- duckdb_engine/tests/test_basic.py | 37 +++++++++++++++++-------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/duckdb_engine/tests/test_basic.py b/duckdb_engine/tests/test_basic.py index 633a2d92..77da54a7 100644 --- a/duckdb_engine/tests/test_basic.py +++ b/duckdb_engine/tests/test_basic.py @@ -184,23 +184,26 @@ def test_get_schema_names(inspector: Inspector, session: Session) -> None: session.commit() # Deliberately excluding pg_catalog schema (to align with Postgres) - names = inspector.get_schema_names() - if supports_attach: - assert names == [ - '"daffy duck".information_schema', - '"daffy duck".main', - '"daffy duck"."quack quack"', - '"daffy duck"."you\'re "" despicable"', - "memory.information_schema", - "memory.main", - 'memory."quack quack"', - "system.information_schema", - "system.main", - "temp.information_schema", - "temp.main", - ] - else: - assert names == ["quack quack", "information_schema", "main", "temp"] + names = set(inspector.get_schema_names()) + expected = { + '"daffy duck".main', + '"daffy duck"."quack quack"', + '"daffy duck"."you\'re "" despicable"', + "memory.main", + 'memory."quack quack"', + "system.information_schema", + "system.main", + "temp.main", + } + if Version(duckdb.__version__) <= Version("1.1.3"): + expected.update( + { + '"daffy duck".information_schema', + "memory.information_schema", + "temp.information_schema", + } + ) + assert names == expected @mark.skipif(