| 263 | @mark.skipif(os.uname().machine == "aarch64", reason="not supported on aarch64") |
| 264 | @mark.remote_data |
| 265 | def test_preload_extension() -> None: |
| 266 | duckdb.connect().execute("INSTALL httpfs") |
| 267 | engine = create_engine( |
| 268 | "duckdb:///", |
| 269 | connect_args={ |
| 270 | "preload_extensions": ["httpfs"], |
| 271 | "config": {"s3_region": "ap-southeast-2", "s3_use_ssl": True}, |
| 272 | }, |
| 273 | ) |
| 274 | |
| 275 | # check that we get an error indicating that the extension was loaded |
| 276 | with engine.connect() as conn, raises(Exception, match="HTTP HEAD"): |
| 277 | conn.execute( |
| 278 | text("SELECT * FROM read_parquet('https://domain/path/to/file.parquet');") |
| 279 | ) |
| 280 | |
| 281 | |
| 282 | @fixture |