From 835f0065f1116f0d2bd82bbcf454f4e4e315da1a Mon Sep 17 00:00:00 2001 From: Eduardo Chiarotti Date: Thu, 16 May 2024 21:15:20 -0300 Subject: [PATCH] test: change tests and gh action file --- .github/workflows/tests.yml | 2 +- tests/crew_test.py | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 37bd8c62d..8bc871414 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,7 +19,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: "3.11" - name: Install Requirements run: | diff --git a/tests/crew_test.py b/tests/crew_test.py index 75868ac9e..514f13e3c 100644 --- a/tests/crew_test.py +++ b/tests/crew_test.py @@ -437,6 +437,7 @@ def test_async_task_execution(): process=Process.sequential, 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: execute.return_value = "ok" @@ -444,13 +445,11 @@ def test_async_task_execution(): thread = threading.Thread(target=lambda: None, args=()).start() start.return_value = thread with patch.object(threading.Thread, "join", wraps=thread.join()) as join: - list_ideas.output = TaskOutput( - description="A 4 paragraph article about AI.", raw_output="ok" - ) - list_important_history.output = TaskOutput( - description="A 4 paragraph article about AI.", raw_output="ok" - ) + list_ideas.output = output + list_important_history.output = output + crew.kickoff() + start.assert_called() join.assert_called()