fix(restructure): fix test regressions from import rewrite

Fix variable name breakage (run_agent, hermes_constants, etc.) where
import rewriter changed 'import X' to 'import hermes_agent.Y' but
test code still referenced 'X' as a variable name.

Fix package-vs-module confusion (cli.auth, cli.models, cli.ui) where
single files became directories.

Fix hardcoded file paths in tests pointing to old locations.
Fix tool registry to discover tools in subpackage directories.
Fix stale import in hermes_agent/tools/__init__.py.

Part of #14182, #14183
This commit is contained in:
alt-glitch 2026-04-23 12:05:10 +05:30
parent 4b16341975
commit a1e667b9f2
113 changed files with 343 additions and 345 deletions

View file

@ -500,7 +500,7 @@ class TestEdgeTTSLazyImport:
reference bare 'edge_tts' module name."""
import ast as _ast
with open("tools/tts_tool.py") as f:
with open("hermes_agent/tools/media/tts.py") as f:
tree = _ast.parse(f.read())
for node in _ast.walk(tree):
@ -538,7 +538,7 @@ class TestStreamingTTSOutputStreamCleanup:
output_stream even on exception."""
import ast as _ast
with open("tools/tts_tool.py") as f:
with open("hermes_agent/tools/media/tts.py") as f:
tree = _ast.parse(f.read())
for node in _ast.walk(tree):
@ -687,7 +687,7 @@ class TestBrowserToolSignalHandlerRemoved:
def test_no_signal_handler_registration(self):
"""Source check: browser_tool.py must not call signal.signal()
for SIGINT or SIGTERM."""
with open("tools/browser_tool.py") as f:
with open("hermes_agent/tools/browser/tool.py") as f:
source = f.read()
lines = source.split("\n")