From 4db29f73906b0c7e7f951873f9d0c49e696c2894 Mon Sep 17 00:00:00 2001 From: David Li Date: Tue, 29 Oct 2024 06:30:18 -0400 Subject: [PATCH] Make example debuggable --- docs/source/python/recipe/postgresql_get_table_schema.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/source/python/recipe/postgresql_get_table_schema.py b/docs/source/python/recipe/postgresql_get_table_schema.py index aacbc1c254..d0d9c4e063 100644 --- a/docs/source/python/recipe/postgresql_get_table_schema.py +++ b/docs/source/python/recipe/postgresql_get_table_schema.py @@ -56,14 +56,16 @@ #: #: Note that the NUMERIC column is read as a string, because PostgreSQL #: decimals do not map onto Arrow decimals. -assert conn.adbc_get_table_schema( +table_schema = conn.adbc_get_table_schema( "example", db_schema_filter="other_schema", -) == pyarrow.schema( +) +expected = pyarrow.schema( [ ("strings", "string"), ("values", "string"), ] ) +assert table_schema == expected, f"Unexpected table schema {table_schema}" conn.close()