Skip to main content
Glama
test_identity_ignorecase.py1.17 kB
import subprocess from pathlib import Path from mcp_agent_mail.app import _resolve_project_identity # type: ignore from mcp_agent_mail.config import get_settings def _git(cwd: Path, *args: str) -> str: cp = subprocess.run(["git", "-C", str(cwd), *args], check=True, capture_output=True, text=True) return cp.stdout.strip() def test_identity_reports_core_ignorecase(tmp_path: Path, monkeypatch) -> None: # Enable worktrees to exercise identity logic branches monkeypatch.setenv("WORKTREES_ENABLED", "1") get_settings.cache_clear() # type: ignore[attr-defined] repo = tmp_path / "repo" repo.mkdir() _git(repo, "init") _git(repo, "config", "user.name", "Unit Test") _git(repo, "config", "user.email", "test@example.com") # Set core.ignorecase true and verify _git(repo, "config", "core.ignorecase", "true") ident_true = _resolve_project_identity(str(repo)) assert ident_true["core_ignorecase"] is True # Set core.ignorecase false and verify _git(repo, "config", "core.ignorecase", "false") ident_false = _resolve_project_identity(str(repo)) assert ident_false["core_ignorecase"] is False

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Dicklesworthstone/mcp_agent_mail'

If you have feedback or need assistance with the MCP directory API, please join our Discord server