mirror of
https://github.com/NCBM/plyngent.git
synced 2026-07-23 05:55:16 +08:00
core/cli: clearer /stream /tools /verbose help text
Use metavar [on|off] and document default/effect so /help stream is readable without guessing ENABLED.
This commit is contained in:
@@ -114,6 +114,15 @@ async def test_help_history_no_fake_options(state: ReplState, capsys: pytest.Cap
|
||||
assert "--help" not in out
|
||||
|
||||
|
||||
async def test_help_stream_clearer(state: ReplState, capsys: pytest.CaptureFixture[str]) -> None:
|
||||
assert await handle_slash(state, "/help stream") is True
|
||||
out = capsys.readouterr().out
|
||||
assert "Usage: /stream [on|off]" in out
|
||||
assert "ENABLED" not in out
|
||||
assert "tokens arrive" in out
|
||||
assert "default" in out
|
||||
|
||||
|
||||
async def test_history_rejects_help_flag(state: ReplState, capsys: pytest.CaptureFixture[str]) -> None:
|
||||
assert await handle_slash(state, "/history --help") is True
|
||||
captured = capsys.readouterr()
|
||||
|
||||
Reference in New Issue
Block a user