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
23 lines
646 B
Python
23 lines
646 B
Python
"""
|
|
Tests for DomainExpertAgent.
|
|
"""
|
|
|
|
import pytest
|
|
from dcos.agents.domain import DomainExpertAgent
|
|
|
|
|
|
class TestDomainExpertAgent:
|
|
def test_domain_initialization(self):
|
|
agent = DomainExpertAgent(name="medical", domain="medicine")
|
|
assert agent.domain == "medicine"
|
|
|
|
def test_answer_question(self):
|
|
agent = DomainExpertAgent(domain="physics")
|
|
answer = agent.answer("What is gravity?")
|
|
assert "[physics]" in answer
|
|
|
|
def test_act(self):
|
|
agent = DomainExpertAgent(domain="chemistry")
|
|
result = agent.act({"question": "What is water?"})
|
|
assert result["domain"] == "chemistry"
|