Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Chore]: CrewAI tests updated due to the new version of CrewAI #563

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions test/interop/crewai/test_crewai.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def test_type_checks(self) -> None:
# runtime check
assert isinstance(interop, Interoperable)

@pytest.mark.skipif(sys.platform == "win32", reason="This test is not supported on Windows")
def test_convert_tool(self) -> None:
with TemporaryDirectory() as tmp_dir:
file_path = f"{tmp_dir}/test.txt"
Expand All @@ -50,7 +49,7 @@ def test_convert_tool(self) -> None:
assert self.tool.name == "Read_a_file_s_content"
assert (
self.tool.description
== "A tool that can be used to read None's content. (IMPORTANT: When using arguments, put them all in an `args` dictionary)"
== "A tool that reads the content of a file. To use this tool, provide a 'file_path' parameter with the path to the file you want to read. (IMPORTANT: When using arguments, put them all in an `args` dictionary)"
)

args = self.model_type(file_path=file_path)
Expand Down
3 changes: 1 addition & 2 deletions test/interop/test_interoperability.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def test_supported_types(self) -> None:
@pytest.mark.skipif(
sys.version_info < (3, 10) or sys.version_info >= (3, 13), reason="Only Python 3.10, 3.11, 3.12 are supported"
)
@pytest.mark.skipif(sys.platform == "win32", reason="This test is not supported on Windows")
def test_crewai(self, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setenv("OPENAI_API_KEY", MOCK_OPEN_AI_API_KEY)
from crewai_tools import FileReadTool
Expand All @@ -48,7 +47,7 @@ def test_crewai(self, monkeypatch: pytest.MonkeyPatch) -> None:
assert tool.name == "Read_a_file_s_content"
assert (
tool.description
== "A tool that can be used to read None's content. (IMPORTANT: When using arguments, put them all in an `args` dictionary)"
== "A tool that reads the content of a file. To use this tool, provide a 'file_path' parameter with the path to the file you want to read. (IMPORTANT: When using arguments, put them all in an `args` dictionary)"
)

model_type = crewai_tool.args_schema
Expand Down
Loading