Merge pull request #2959 from UmakanthKaspa/add-git-status-test

Add test for git_status function
This commit is contained in:
Ola Hungerford 2025-11-08 08:37:35 -07:00 • committed by GitHub
commit 65994ca3db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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()