mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-26 00:28:13 +00:00
Fix lint error and validation error in test_markdown_task.py
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
"""Test the markdown attribute in Task class."""
|
"""Test the markdown attribute in Task class."""
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from unittest.mock import patch
|
from pydantic import BaseModel
|
||||||
|
|
||||||
from crewai import Agent, Task
|
from crewai import Agent, Task
|
||||||
|
|
||||||
@@ -70,6 +70,10 @@ def test_markdown_with_empty_description():
|
|||||||
def test_markdown_with_complex_output_format():
|
def test_markdown_with_complex_output_format():
|
||||||
"""Test markdown with JSON output format to ensure compatibility."""
|
"""Test markdown with JSON output format to ensure compatibility."""
|
||||||
|
|
||||||
|
class ResearchOutput(BaseModel):
|
||||||
|
title: str
|
||||||
|
findings: list[str]
|
||||||
|
|
||||||
researcher = Agent(
|
researcher = Agent(
|
||||||
role="Researcher",
|
role="Researcher",
|
||||||
goal="Research a topic",
|
goal="Research a topic",
|
||||||
@@ -81,7 +85,7 @@ def test_markdown_with_complex_output_format():
|
|||||||
description="Research topic",
|
description="Research topic",
|
||||||
expected_output="Research results",
|
expected_output="Research results",
|
||||||
markdown=True,
|
markdown=True,
|
||||||
output_json=True,
|
output_json=ResearchOutput,
|
||||||
agent=researcher,
|
agent=researcher,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user