The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(cli): trim the launchd plist guard to two invariants
teknium1501f4bcf1c59
diff --git a/tests/hermes_cli/test_launchd_plist_guard.py b/tests/hermes_cli/test_launchd_plist_guard.pyindex 45cb22a6cdd..a1f09919198 100644--- a/tests/hermes_cli/test_launchd_plist_guard.py+++ b/tests/hermes_cli/test_launchd_plist_guard.py@@ -1,15 +1,13 @@# -*- coding: utf-8 -*-"""Regression tests for the launchd plist scan's malformed-file tolerance.-Refs #114142. ``_loaded_launchd_backend_jobs`` documents that unreadable or+``_loaded_launchd_backend_jobs`` documents that unreadable ormalformed plists are skipped, but ``plistlib.load`` propagates``xml.parsers.expat.ExpatError`` (which is NOT a ``ValueError`` subclass) forXML that is not well-formed, so one hand-edited LaunchAgent plist aborted thewhole ``hermes update`` post-pull cleanup instead of being skipped."""import os-import plistlib-import xml.parsers.expatfrom unittest import mockfrom hermes_cli import main_dashboard@@ -36,20 +34,6 @@ GOOD_PLIST = ()-def test_fixture_really_raises_expat_error_not_valueerror(tmp_path):- # The regression only exists because ExpatError is not a ValueError: pin- # both halves of that premise so the fixture cannot silently go benign.- assert not issubclass(xml.parsers.expat.ExpatError, ValueError)- p = tmp_path / "com.example.bad.plist"- p.write_text(MALFORMED_PLIST)- with open(p, "rb") as f:- try:- plistlib.load(f)- except xml.parsers.expat.ExpatError:- return- raise AssertionError("fixture plist must be unparseable XML")--def test_malformed_plist_is_skipped_not_fatal(tmp_path, monkeypatch):p = tmp_path / "com.example.bad.plist"p.write_text(MALFORMED_PLIST)