From 4225ab46e1af2b37f04248d45490be8a1226310d Mon Sep 17 00:00:00 2001 From: UmakanthKaspa Date: Thu, 6 Nov 2025 16:58:07 +0000 Subject: [PATCH] Add test for git_status function Adds test coverage for the previously untested git_status function. The test verifies that the function returns valid git status output containing branch information. --- src/git/tests/test_server.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/git/tests/test_server.py b/src/git/tests/test_server.py index c26a385b72..5949fd68d2 100644 --- a/src/git/tests/test_server.py +++ b/src/git/tests/test_server.py @@ -1,7 +1,7 @@ import pytest from pathlib import Path import git -from mcp_server_git.server import git_checkout, git_branch, git_add +from mcp_server_git.server import git_checkout, git_branch, git_add, git_status import shutil @pytest.fixture @@ -91,3 +91,9 @@ def test_git_add_specific_files(test_repository): assert "file1.txt" in staged_files assert "file2.txt" not in staged_files assert result == "Files staged successfully" + +def test_git_status(test_repository): + result = git_status(test_repository) + + assert result is not None + assert "On branch" in result or "branch" in result.lower()