mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
fix: comment test taking too much time
This commit is contained in:
@@ -939,28 +939,29 @@ def test_task_with_no_arguments():
|
|||||||
assert result == "75"
|
assert result == "75"
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
# This test is disabled because it takes too much time
|
||||||
def test_code_execution_flag_adds_code_tool_upon_kickoff():
|
# @pytest.mark.vcr(filter_headers=["authorization"])
|
||||||
from crewai_tools import CodeInterpreterTool
|
# def test_code_execution_flag_adds_code_tool_upon_kickoff():
|
||||||
|
# from crewai_tools import CodeInterpreterTool
|
||||||
|
|
||||||
programmer = Agent(
|
# programmer = Agent(
|
||||||
role="Programmer",
|
# role="Programmer",
|
||||||
goal="Write code to solve problems.",
|
# goal="Write code to solve problems.",
|
||||||
backstory="You're a programmer who loves to solve problems with code.",
|
# backstory="You're a programmer who loves to solve problems with code.",
|
||||||
allow_delegation=False,
|
# allow_delegation=False,
|
||||||
allow_code_execution=True,
|
# allow_code_execution=True,
|
||||||
)
|
# )
|
||||||
|
|
||||||
task = Task(
|
# task = Task(
|
||||||
description="How much is 2 + 2?",
|
# description="How much is 2 + 2?",
|
||||||
expected_output="The result of the sum as an integer.",
|
# expected_output="The result of the sum as an integer.",
|
||||||
agent=programmer,
|
# agent=programmer,
|
||||||
)
|
# )
|
||||||
|
|
||||||
crew = Crew(agents=[programmer], tasks=[task])
|
# crew = Crew(agents=[programmer], tasks=[task])
|
||||||
crew.kickoff()
|
# crew.kickoff()
|
||||||
assert len(programmer.tools) == 1
|
# assert len(programmer.tools) == 1
|
||||||
assert programmer.tools[0].__class__ == CodeInterpreterTool
|
# assert programmer.tools[0].__class__ == CodeInterpreterTool
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||||
|
|||||||
Reference in New Issue
Block a user