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
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
"""
|
||||
Tests for ConfigManager.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from dcos.utils.config import ConfigManager
|
||||
|
||||
|
||||
class TestConfigManager:
|
||||
def test_get_default(self):
|
||||
config = ConfigManager()
|
||||
assert config.get("version") == "1.0.0"
|
||||
|
||||
def test_set_and_get(self):
|
||||
config = ConfigManager()
|
||||
config.set("custom_key", "custom_value")
|
||||
assert config.get("custom_key") == "custom_value"
|
||||
|
||||
def test_get_missing_default(self):
|
||||
config = ConfigManager()
|
||||
assert config.get("nonexistent", "fallback") == "fallback"
|
||||
|
||||
def test_all_settings(self):
|
||||
config = ConfigManager()
|
||||
settings = config.all_settings()
|
||||
assert "version" in settings
|
||||
assert "max_agents" in settings
|
||||
Reference in New Issue
Block a user