MCPcopy Create free account
hub / github.com/Mause/duckdb_engine / test_preload_extension

Function test_preload_extension

duckdb_engine/tests/test_basic.py:265–279  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

263@mark.skipif(os.uname().machine == "aarch64", reason="not supported on aarch64")
264@mark.remote_data
265def 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

Callers

nothing calls this directly

Calls 2

executeMethod · 0.80
connectMethod · 0.80

Tested by

no test coverage detected