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
21 lines
548 B
Python
21 lines
548 B
Python
"""
|
|
Tests for SimulationAgent.
|
|
"""
|
|
|
|
import pytest
|
|
from dcos.agents.simulation import SimulationAgent
|
|
|
|
|
|
class TestSimulationAgent:
|
|
def test_simulate(self):
|
|
agent = SimulationAgent()
|
|
result = agent.simulate("market_scenario", iterations=100)
|
|
assert result["scenario"] == "market_scenario"
|
|
assert "success_probability" in result
|
|
|
|
def test_act(self):
|
|
agent = SimulationAgent()
|
|
result = agent.act({"scenario": "test"})
|
|
assert "result" in result
|
|
assert result["iterations"] == 1000
|