mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-11 00:58:30 +00:00
test: change tests and gh action file
This commit is contained in:
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version: "3.11"
|
||||||
|
|
||||||
- name: Install Requirements
|
- name: Install Requirements
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -437,6 +437,7 @@ def test_async_task_execution():
|
|||||||
process=Process.sequential,
|
process=Process.sequential,
|
||||||
tasks=[list_ideas, list_important_history, write_article],
|
tasks=[list_ideas, list_important_history, write_article],
|
||||||
)
|
)
|
||||||
|
output = TaskOutput(description="A 4 paragraph article about AI.", raw_output="ok")
|
||||||
|
|
||||||
with patch.object(Agent, "execute_task") as execute:
|
with patch.object(Agent, "execute_task") as execute:
|
||||||
execute.return_value = "ok"
|
execute.return_value = "ok"
|
||||||
@@ -444,13 +445,11 @@ def test_async_task_execution():
|
|||||||
thread = threading.Thread(target=lambda: None, args=()).start()
|
thread = threading.Thread(target=lambda: None, args=()).start()
|
||||||
start.return_value = thread
|
start.return_value = thread
|
||||||
with patch.object(threading.Thread, "join", wraps=thread.join()) as join:
|
with patch.object(threading.Thread, "join", wraps=thread.join()) as join:
|
||||||
list_ideas.output = TaskOutput(
|
list_ideas.output = output
|
||||||
description="A 4 paragraph article about AI.", raw_output="ok"
|
list_important_history.output = output
|
||||||
)
|
|
||||||
list_important_history.output = TaskOutput(
|
|
||||||
description="A 4 paragraph article about AI.", raw_output="ok"
|
|
||||||
)
|
|
||||||
crew.kickoff()
|
crew.kickoff()
|
||||||
|
|
||||||
start.assert_called()
|
start.assert_called()
|
||||||
join.assert_called()
|
join.assert_called()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user