@@ -85,8 +85,9 @@ def test_default_ducklake_configuration() -> None:
8585 )
8686
8787 configuration = resolve_configuration (
88- DuckLakeClientConfiguration (pipeline_name = pipeline_name )
89- ._bind_dataset_name (dataset_name = "FOO" )
88+ DuckLakeClientConfiguration (pipeline_name = pipeline_name )._bind_dataset_name (
89+ dataset_name = "FOO"
90+ )
9091 )
9192 credentials = configuration .credentials
9293
@@ -96,13 +97,13 @@ def test_default_ducklake_configuration() -> None:
9697 assert credentials .ducklake_name == expected_ducklake_name
9798
9899 assert credentials .database == credentials .catalog .database == str (expected_path )
99-
100+
100101 # currently, we use `drivername="duckdb"` for the ducklake client;
101102 # if we change it to `drivername="ducklake"`, update this check
102103 ducklake_client_url = credentials .to_native_representation ()
103104 catalog_url = credentials .catalog .to_native_representation ()
104105 assert ducklake_client_url == catalog_url == expected_db_url
105-
106+
106107 assert credentials .storage is None
107108 # value is resolved
108109 assert credentials .attach_statement == expected_attach_statement
@@ -111,10 +112,13 @@ def test_default_ducklake_configuration() -> None:
111112def test_ducklake_sqlclient (tmp_path ):
112113 pipeline_name = "foo"
113114 configuration = resolve_configuration (
114- DuckLakeClientConfiguration (pipeline_name = pipeline_name )
115- ._bind_dataset_name (dataset_name = "test_conf" )
115+ DuckLakeClientConfiguration (pipeline_name = pipeline_name )._bind_dataset_name (
116+ dataset_name = "test_conf"
117+ )
118+ )
119+ expected_attach_statement = (
120+ f"ATTACH IF NOT EXISTS 'ducklake:{ pipeline_name } .ducklake' AS { pipeline_name } "
116121 )
117- expected_attach_statement = f"ATTACH IF NOT EXISTS 'ducklake:{ pipeline_name } .ducklake' AS { pipeline_name } "
118122 assert configuration .credentials .attach_statement == expected_attach_statement
119123
120124 # TODO patch `ducklake` extension directory to unit test extension installation
@@ -146,9 +150,9 @@ def test_ducklake_sqlclient(tmp_path):
146150
147151
148152def test_destination_defaults () -> None :
149- """Check that catalog and storage are materialized at the right
153+ """Check that catalog and storage are materialized at the right
150154 location and properly derive their name from the pipeline name.
151-
155+
152156 Note that default storage is managed by the ducklake extension itself.
153157 """
154158 pipeline = dlt .pipeline ("destination_defaults" , destination = "ducklake" )
@@ -175,4 +179,4 @@ def test_destination_defaults() -> None:
175179
176180
177181# def test_assert_configure_storage_location():
178- # ...
182+ # ...
0 commit comments