From e3d53dd1859b2f14baf67de190122532fcf07077 Mon Sep 17 00:00:00 2001 From: Will Jones Date: Mon, 30 Mar 2026 14:48:49 -0700 Subject: [PATCH] fix(python): skip test_url_retrieve_downloads_image when PIL not installed (#3208) The test added in #3190 unconditionally imports `PIL`, which is an optional dependency. This causes CI failures in environments where Pillow isn't installed (`ModuleNotFoundError: No module named 'PIL'`). Use `pytest.importorskip` to skip gracefully when Pillow is unavailable. Fixes CI failure on main. Co-authored-by: Claude Sonnet 4.6 --- python/python/tests/test_embeddings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/python/tests/test_embeddings.py b/python/python/tests/test_embeddings.py index 3f2c1cba8..43f7b44ac 100644 --- a/python/python/tests/test_embeddings.py +++ b/python/python/tests/test_embeddings.py @@ -559,7 +559,8 @@ def test_url_retrieve_downloads_image(): matching the real usage pattern in embedding functions. """ import io - from PIL import Image + + Image = pytest.importorskip("PIL.Image") from lancedb.embeddings.utils import url_retrieve image_url = "http://farm1.staticflickr.com/53/167798175_7c7845bbbd_z.jpg"