mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-03 02:11:48 +00:00
fix(ci): stabilize main test suite regressions (#17660)
* fix: stabilize main test suite regressions * test(agent): update MiniMax normalization expectation * test: stabilize remaining CI assertions * test: harden config helper monkeypatching * test: harden CI-only assertions * fix(agent): propagate fast streaming interrupts
This commit is contained in:
parent
e7beaaf184
commit
f73364b1c4
37 changed files with 450 additions and 127 deletions
|
|
@ -36,6 +36,28 @@ class TestProviderSelectionGate:
|
|||
configure ``{"enabled": True, "provider": ...}`` for explicit tests.
|
||||
"""
|
||||
|
||||
def test_import_after_config_env_patch_uses_restored_dotenv_loader(self):
|
||||
"""Importing STT while hermes_cli.config.get_env_value is patched must
|
||||
not freeze that temporary helper into this module forever.
|
||||
"""
|
||||
import importlib
|
||||
import hermes_cli.config as config_mod
|
||||
from tools import transcription_tools as tt
|
||||
|
||||
with pytest.MonkeyPatch.context() as mp:
|
||||
mp.setattr(config_mod, "get_env_value", lambda name, default=None: "")
|
||||
tt = importlib.reload(tt)
|
||||
|
||||
try:
|
||||
with patch.object(tt, "_HAS_FASTER_WHISPER", False), \
|
||||
patch.object(tt, "_HAS_OPENAI", True), \
|
||||
patch.object(tt, "_has_local_command", return_value=False), \
|
||||
patch("hermes_cli.config.load_env",
|
||||
return_value={"GROQ_API_KEY": "dotenv-secret"}):
|
||||
assert tt._get_provider({"enabled": True, "provider": "groq"}) == "groq"
|
||||
finally:
|
||||
importlib.reload(tt)
|
||||
|
||||
def test_explicit_groq_sees_dotenv(self):
|
||||
from tools import transcription_tools as tt
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue