Files
hermes-agent/tests/agent/test_skill_inline_shell_output.py
kshitijk4poor 70203f7752 test(agent): trim #121548 tests to the two invariants
Keep only guard parity (a minted marker matches _COMPRESSION_MARKER_RE)
and the source-level no-imitable-idiom invariant; the per-helper and
per-renderer unit tests restate the helpers and are covered by the
existing renderer tests updated in the cherry-pick.
2026-09-26 23:49:25 +05:30

13 lines
534 B
Python

"""Inline-shell snippets never turn a silent failure into an empty (looks-fine) result."""
from agent.skill_preprocessing import run_inline_shell
def test_silent_nonzero_exit_returns_marker(tmp_path):
"""rc!=0 with no stdout and no stderr is the interpreter-never-ran signature (#116818)."""
out = run_inline_shell("exit 3", tmp_path, 5)
assert out.strip() and "3" in out
def test_nonzero_exit_with_stderr_keeps_the_diagnostic(tmp_path):
assert run_inline_shell('printf "diag" >&2; exit 3', tmp_path, 5) == "diag"