MCPcopy Create free account
hub / github.com/IBM/mcp-cli / test_truncation

Method test_truncation

tests/memory/test_store.py:123–131  ·  view source on GitHub ↗
(self, tmp_path: Path)

Source from the content-addressed store, hash-verified

121 assert "**db**" in prompt
122
123 def test_truncation(self, tmp_path: Path):
124 store = MemoryScopeStore(
125 base_dir=tmp_path, workspace_dir="/test", max_prompt_chars=50
126 )
127 store.remember(MemoryScope.GLOBAL, "key", "x" * 200)
128
129 prompt = store.format_for_system_prompt()
130 assert len(prompt) <= 50
131 assert prompt.endswith("...")
132
133
134class TestWorkspaceScoping:

Callers

nothing calls this directly

Calls 3

rememberMethod · 0.95
MemoryScopeStoreClass · 0.90

Tested by

no test coverage detected