Skip to content

Commit 4aaf494

Browse files
GWealecopybara-github
authored andcommitted
fix: skip crewai test on ImportError for pytest 9.1 compatibility
Co-authored-by: George Weale <gweale@google.com> PiperOrigin-RevId: 932734764
1 parent 225fafc commit 4aaf494

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/unittests/integrations/crewai/test_crewai_tool.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616

1717
import pytest
1818

19-
# Skip entire module if Python < 3.10 (must be before crewai_tool import)
19+
# Skip the module when the optional crewai dependency is not installed. Guard on
20+
# the third-party dep itself rather than the adk wrapper, so a real import bug in
21+
# crewai_tool surfaces as a failure instead of being silently skipped.
2022
pytest.importorskip(
21-
"google.adk.integrations.crewai.crewai_tool", reason="Requires Python 3.10+"
23+
"crewai.tools", reason="Requires crewai (google-adk[extensions])"
2224
)
2325

2426
from google.adk.agents.context import Context

0 commit comments

Comments
 (0)