From ceda2c52fe610441e04bc0bd8cb1d8e0d5e75db4 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Fri, 2 Feb 2024 06:02:09 -0500 Subject: [PATCH] test(duckdb): account for other errors when running in the nix sandbox --- ibis/backends/duckdb/tests/test_register.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ibis/backends/duckdb/tests/test_register.py b/ibis/backends/duckdb/tests/test_register.py index c1f7b6cfa8f4..eec6a6520334 100644 --- a/ibis/backends/duckdb/tests/test_register.py +++ b/ibis/backends/duckdb/tests/test_register.py @@ -110,7 +110,7 @@ def test_read_geo_from_url(con, monkeypatch): loaded_exts = [] monkeypatch.setattr(con, "_load_extensions", lambda x, **_: loaded_exts.extend(x)) - with pytest.raises(duckdb.IOException): + with pytest.raises((duckdb.IOException, duckdb.CatalogException)): # The read will fail, either because the URL is bogus (which it is) or # because the current connection doesn't have the spatial extension # installed and so the call to `st_read` will raise a catalog error. @@ -355,7 +355,7 @@ def test_set_temp_dir(tmp_path): "nix on linux cannot download duckdb extensions or data due to sandboxing; " "duckdb will try to automatically install and load read_parquet" ), - raises=duckdb.IOException, + raises=(duckdb.Error, duckdb.IOException), ) def test_s3_403_fallback(con, httpserver, monkeypatch): # monkeypatch to avoid downloading extensions in tests