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,26 @@
|
||||
"""
|
||||
Tests for CLI module.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from dcos.utils.cli import main
|
||||
|
||||
|
||||
class TestCLI:
|
||||
def test_version(self):
|
||||
result = main(["--version"])
|
||||
assert result == 0
|
||||
|
||||
def test_status(self):
|
||||
result = main(["status"])
|
||||
assert result == 0
|
||||
|
||||
def test_info(self):
|
||||
result = main(["info"])
|
||||
assert result == 0
|
||||
|
||||
def test_unknown_command(self):
|
||||
with pytest.raises(SystemExit) as exc:
|
||||
main(["badcommand"])
|
||||
# argparse exits with code 2 for invalid choices
|
||||
assert exc.value.code == 2
|
||||
Reference in New Issue
Block a user