mirror of
https://github.com/crewAIInc/crewAI.git
synced 2025-12-31 03:38:30 +00:00
21 lines
601 B
Python
21 lines
601 B
Python
import pytest
|
|
|
|
from crewai.agent import Agent
|
|
from crewai.crew import Crew
|
|
|
|
|
|
def test_crew_plot_method_not_implemented():
|
|
"""Test that trying to plot a Crew raises the correct error."""
|
|
agent = Agent(
|
|
role="Test Agent",
|
|
goal="Test Goal",
|
|
backstory="Test Backstory"
|
|
)
|
|
crew = Crew(agents=[agent], tasks=[])
|
|
|
|
with pytest.raises(NotImplementedError) as excinfo:
|
|
crew.plot()
|
|
|
|
assert "plot method is not available for Crew objects" in str(excinfo.value)
|
|
assert "Plot functionality is only available for Flow objects" in str(excinfo.value)
|