From eddbaee563325e1ef66cd209e28e74c3869fa361 Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Fri, 30 Jan 2026 20:35:32 +0000 Subject: [PATCH] Initial upload: git-insights-cli with CI/CD workflow --- tests/test_cli.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 tests/test_cli.py diff --git a/tests/test_cli.py b/tests/test_cli.py new file mode 100644 index 0000000..a9edbfe --- /dev/null +++ b/tests/test_cli.py @@ -0,0 +1,39 @@ +import pytest +from click.testing import CliRunner +from src.cli import main + + +class TestCLI: + """Test CLI commands.""" + + def test_main_help(self): + """Test main command help.""" + runner = CliRunner() + result = runner.invoke(main, ["--help"]) + assert result.exit_code == 0 + assert "Git Insights" in result.output + + def test_analyze_help(self): + """Test analyze command help.""" + runner = CliRunner() + result = runner.invoke(main, ["analyze", "--help"]) + assert result.exit_code == 0 + assert "analyze" in result.output.lower() + + def test_dashboard_help(self): + """Test dashboard command help.""" + runner = CliRunner() + result = runner.invoke(main, ["dashboard", "--help"]) + assert result.exit_code == 0 + + def test_export_help(self): + """Test export command help.""" + runner = CliRunner() + result = runner.invoke(main, ["export", "--help"]) + assert result.exit_code == 0 + + def test_report_help(self): + """Test report command help.""" + runner = CliRunner() + result = runner.invoke(main, ["report", "--help"]) + assert result.exit_code == 0