mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-02 02:01:47 +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
|
|
@ -758,19 +758,12 @@ class TestValidateAudioFileEdgeCases:
|
|||
f = tmp_path / "test.ogg"
|
||||
f.write_bytes(b"data")
|
||||
from tools.transcription_tools import _validate_audio_file
|
||||
real_stat = f.stat()
|
||||
call_count = 0
|
||||
|
||||
def stat_side_effect(*args, **kwargs):
|
||||
nonlocal call_count
|
||||
call_count += 1
|
||||
# First calls are from exists() and is_file(), let them pass
|
||||
if call_count <= 2:
|
||||
return real_stat
|
||||
raise OSError("disk error")
|
||||
|
||||
with patch("pathlib.Path.stat", side_effect=stat_side_effect):
|
||||
with patch("pathlib.Path.exists", return_value=True), \
|
||||
patch("pathlib.Path.is_file", return_value=True), \
|
||||
patch("pathlib.Path.stat", side_effect=OSError("disk error")):
|
||||
result = _validate_audio_file(str(f))
|
||||
|
||||
assert result is not None
|
||||
assert "Failed to access" in result["error"]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue