test(cli): preserve oneshot usage file through hard exit

This commit is contained in:
harjoth 2026-07-10 14:06:03 -07:00 committed by kshitij
parent bfa7a794cb
commit b82ffdaa4d
1 changed files with 12 additions and 2 deletions

View File

@ -588,7 +588,17 @@ def test_main_top_level_oneshot_accepts_toolsets(monkeypatch, main_mod):
import hermes_cli.config as config_mod
monkeypatch.setattr(
sys, "argv", ["hermes", "-z", "hello", "--toolsets", "web,terminal"]
sys,
"argv",
[
"hermes",
"-z",
"hello",
"--toolsets",
"web,terminal",
"--usage-file",
"usage.json",
],
)
monkeypatch.setitem(
sys.modules,
@ -634,7 +644,7 @@ def test_main_top_level_oneshot_accepts_toolsets(monkeypatch, main_mod):
"model": None,
"provider": None,
"toolsets": "web,terminal",
"usage_file": None,
"usage_file": "usage.json",
}