MCPcopy Create free account
hub / github.com/idank/explainshell / _fake_codex

Function _fake_codex

tests/extraction/llm/test_codex_provider.py:15–21  ·  view source on GitHub ↗

Return a codex_bin command list that runs *script* via bash -c. The ``--`` serves as argv0 so the provider's arguments (``exec --json …``) land in ``$1 $2 …`` as the test scripts expect.

(script: str)

Source from the content-addressed store, hash-verified

13
14
15def _fake_codex(script: str) -> list[str]:
16 """Return a codex_bin command list that runs *script* via bash -c.
17
18 The ``--`` serves as argv0 so the provider's arguments (``exec --json …``)
19 land in ``$1 $2 …`` as the test scripts expect.
20 """
21 return ["bash", "-c", script, "--"]
22
23
24def _jsonl_response(text: str, input_tokens: int = 0, output_tokens: int = 0) -> str:

Calls

no outgoing calls

Tested by

no test coverage detected