Files
Celes Renata 57619860d5 feat: implement DCOS source tree, tests, and build configuration
Complete implementation of the DCOS package including:
- 40+ Python source files across agents, communication, core, learning, memory, protocols, utils
- pyproject.toml build configuration
- 102 unit tests across all subsystems
- Fixed flake.nix (Python 3.12, proper dependencies, pyproject build)
- Fixed .woodpecker.yml (correct paths, removed silent-fail flags)
- Added .gitignore
- Cleared stale pytest cache
2026-08-02 03:29:55 -07:00

33 lines
901 B
Python

"""
Tests for PlanningAgent.
"""
import pytest
from dcos.agents.planning import PlanningAgent
from dcos.agents.base import AgentRole
class TestPlanningAgent:
def test_initialization(self):
agent = PlanningAgent()
assert agent.identity.name == "planner"
assert agent.identity.role == AgentRole.PLANNER
def test_act_returns_plan(self):
agent = PlanningAgent()
result = agent.act({"goal": "test_goal"})
assert "plan" in result
assert "steps" in result
def test_decompose_goal(self):
agent = PlanningAgent()
tasks = agent.decompose("complex_goal")
assert len(tasks) > 0
assert tasks[0]["id"] == "research"
def test_capabilities(self):
agent = PlanningAgent()
caps = agent.get_capabilities()
assert "strategic_planning" in caps
assert "task_decomposition" in caps