Skip to content

Commit b71a118

Browse files
authored
Use importorskip for PIL in ReAct test (#8870)
1 parent c33718d commit b71a118

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ dependencies = [
4040
"cachetools>=5.5.0",
4141
"cloudpickle>=3.0.0",
4242
"rich>=13.7.1",
43+
"pillow>=10.1.0",
4344
"numpy>=1.26.0",
4445
"xxhash>=3.5.0",
4546
"gepa[dspy]==0.0.17",

tests/predict/test_react.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22

33
import litellm
44
import pytest
5-
from PIL import Image
65
from pydantic import BaseModel
76

87
import dspy
98
from dspy.utils.dummies import DummyLM
109

1110

11+
@pytest.mark.extra
1212
def test_tool_observation_preserves_custom_type():
13+
pytest.importorskip("PIL.Image")
14+
from PIL import Image
15+
1316
captured_calls = []
1417

1518
class SpyChatAdapter(dspy.ChatAdapter):

uv.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)