Files
shellgenius/tests/test_integration.py
7000pctAUTO 6a42aeb8c1
Some checks failed
CI / test (push) Failing after 12s
CI / lint (push) Failing after 6s
CI / type-check (push) Failing after 11s
Add test files
2026-02-04 11:03:06 +00:00

47 lines
1.6 KiB
Python

"""Integration tests for ShellGenius."""
import pytest
from unittest.mock import Mock, patch
class TestIntegration:
def test_cli_commands_registered(self):
"""Test that all CLI commands are registered."""
from shellgenius.cli import main
commands = [cmd.name for cmd in main.commands]
assert "generate" in commands
assert "explain" in commands
assert "refactor" in commands
assert "history" in commands
assert "models" in commands
assert "check" in commands
assert "version" in commands
def test_module_imports(self):
"""Test that all modules can be imported."""
from shellgenius import __version__
from shellgenius.cli import main
from shellgenius.config import Config
from shellgenius.generation import ShellGenerator
from shellgenius.explainer import ShellExplainer
from shellgenius.refactoring import RefactoringAnalyzer
from shellgenius.history import HistoryLearner
from shellgenius.ollama_client import OllamaClient
assert __version__ == "0.1.0"
def test_package_structure(self):
"""Test that package structure is correct."""
import shellgenius
assert hasattr(shellgenius, "__version__")
assert hasattr(shellgenius, "cli")
assert hasattr(shellgenius, "config")
assert hasattr(shellgenius, "generation")
assert hasattr(shellgenius, "explainer")
assert hasattr(shellgenius, "refactoring")
assert hasattr(shellgenius, "history")
assert hasattr(shellgenius, "ollama_client")