diff --git a/tests/load/filesystem/test_sql_client.py b/tests/load/filesystem/test_sql_client.py index 4de64d22c4..2e8d7fd058 100644 --- a/tests/load/filesystem/test_sql_client.py +++ b/tests/load/filesystem/test_sql_client.py @@ -76,7 +76,7 @@ def double_items(): pipeline.destination = alternate_access_pipeline.destination import duckdb - from duckdb import HTTPException + from duckdb import HTTPException, IOException from dlt.destinations.impl.filesystem.sql_client import ( FilesystemSqlClient, DuckDbCredentials, @@ -169,7 +169,7 @@ def _fs_sql_client_for_external_db( # in other cases secrets are not available and this should fail external_db = _external_duckdb_connection() - with pytest.raises(HTTPException): + with pytest.raises((HTTPException, IOException)): assert ( len(external_db.sql("SELECT * FROM second.referenced_items").fetchall()) == total_records @@ -195,7 +195,7 @@ def _fs_sql_client_for_external_db( # fails again external_db = _external_duckdb_connection() - with pytest.raises(HTTPException): + with pytest.raises((HTTPException, IOException)): assert ( len(external_db.sql("SELECT * FROM second.referenced_items").fetchall()) == total_records