From 6a42aeb8c12f6f3fe25ae59e60a4e74e4cf74795 Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Wed, 4 Feb 2026 11:03:06 +0000 Subject: [PATCH] Add test files --- tests/test_integration.py | 46 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 tests/test_integration.py diff --git a/tests/test_integration.py b/tests/test_integration.py new file mode 100644 index 0000000..08aba9b --- /dev/null +++ b/tests/test_integration.py @@ -0,0 +1,46 @@ +"""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")