We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/basicmachines-co/basic-memory'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
"""Regression tests for bm reset command process exit behavior."""
import os
import platform
import subprocess
from pathlib import Path
import pytest
IS_WINDOWS = platform.system() == "Windows"
skip_on_windows = pytest.mark.skipif(
IS_WINDOWS, reason="Subprocess cleanup tests are unreliable on Windows CI"
)
def _isolated_env(tmp_path: Path) -> dict[str, str]:
env = dict(os.environ)
env["HOME"] = str(tmp_path)
if os.name == "nt":
env["USERPROFILE"] = str(tmp_path)
env["BASIC_MEMORY_HOME"] = str(tmp_path / "basic-memory")
env["BASIC_MEMORY_CONFIG_DIR"] = str(tmp_path / ".basic-memory")
return env
@skip_on_windows
def test_bm_reset_exits_cleanly(tmp_path: Path):
"""bm reset should finish and exit cleanly with non-interactive confirmation."""
result = subprocess.run(
["uv", "run", "bm", "reset"],
input="y\n",
capture_output=True,
text=True,
timeout=20,
cwd=Path(__file__).parent.parent.parent,
env=_isolated_env(tmp_path),
)
assert result.returncode == 0, result.stderr
assert "Database reset complete" in result.stdout
@skip_on_windows
def test_bm_reset_reindex_exits_cleanly(tmp_path: Path):
"""bm reset --reindex should finish and exit cleanly with non-interactive confirmation."""
result = subprocess.run(
["uv", "run", "bm", "reset", "--reindex"],
input="y\n",
capture_output=True,
text=True,
timeout=30,
cwd=Path(__file__).parent.parent.parent,
env=_isolated_env(tmp_path),
)
assert result.returncode == 0, result.stderr
assert "Reindex complete" in result.stdout