MCPcopy Index your code
hub / github.com/idank/explainshell / _make_prepared

Function _make_prepared

tests/extraction/test_runner.py:25–36  ·  view source on GitHub ↗

Build a minimal PreparedFile for testing.

(basename: str, n_chunks: int = 1)

Source from the content-addressed store, hash-verified

23
24
25def _make_prepared(basename: str, n_chunks: int = 1) -> PreparedFile:
26 """Build a minimal PreparedFile for testing."""
27 return PreparedFile(
28 synopsis="test",
29 aliases=[],
30 original_lines={},
31 basename=basename,
32 numbered_text="",
33 plain_text_len=100,
34 plain_text="x" * 100,
35 requests=[f"content-{basename}-{i}" for i in range(n_chunks)],
36 )
37
38
39def _make_result(gz_path: str = "") -> ExtractionResult:

Calls 2

PreparedFileClass · 0.90
rangeFunction · 0.85

Tested by

no test coverage detected