Skip to content

The agent that grows with you

test(cli): auxiliary-bridge source scan follows load_cli_config to hermes_cli/cli_config_load.py

teknium1e30381866934
diff --git a/tests/agent/test_auxiliary_config_bridge.py b/tests/agent/test_auxiliary_config_bridge.py
index 3291fe28690..75dd9d6e6bf 100644
--- a/tests/agent/test_auxiliary_config_bridge.py
+++ b/tests/agent/test_auxiliary_config_bridge.py
@@ -238,10 +238,14 @@ class TestCLIDefaultsHaveAuxiliaryKeys:
# carries over keys from file_config that aren't in defaults.
# So auxiliary config from config.yaml gets merged even though
# cli.py's defaults dict doesn't define it.
+ import inspect
+
import cli as _cli_mod
- # See note in test_gateway_has_auxiliary_bridge — pin UTF-8 so the
- # test runs on Windows where the default locale is cp1252.
- source = Path(_cli_mod.__file__).read_text(encoding="utf-8")
+ # load_cli_config lives in hermes_cli/cli_config_load.py (re-exported by
+ # ``cli``); follow the function to its source file rather than pinning
+ # cli.py. See note in test_gateway_has_auxiliary_bridge — pin UTF-8 so
+ # the test runs on Windows where the default locale is cp1252.
+ source = Path(inspect.getsourcefile(_cli_mod.load_cli_config)).read_text(encoding="utf-8")
assert "auxiliary_config = defaults.get(\"auxiliary\"" in source
assert "_AUXILIARY_TASK_ENV" in source
assert "AUXILIARY_VISION_PROVIDER" in source