guanghu-ice-heart/skills/codex/enter-fifth-domain/scripts/test_resolve_route.py

27 lines
874 B
Python
Raw Normal View History

import unittest
from resolve_route import parse_code_map
class ParseCodeMapTests(unittest.TestCase):
def test_resolves_requested_identifiers_and_strips_comments(self):
text = """
REPO-012-WEB=https://example.invalid/guanghu-ice-heart
ICE-GL-ZY001=eternal-lake-heart/heartbeat-core/zhuyuan-persona-system/INDEX.hdlp # current
LL-004=tcs-core/LL-004-LAKE-LAMP-WAKE-PATH.hdlp
"""
self.assertEqual(
parse_code_map(text, ("ICE-GL-ZY001", "LL-004")),
{
"ICE-GL-ZY001": "eternal-lake-heart/heartbeat-core/zhuyuan-persona-system/INDEX.hdlp",
"LL-004": "tcs-core/LL-004-LAKE-LAMP-WAKE-PATH.hdlp",
},
)
def test_ignores_unrequested_identifiers(self):
self.assertEqual(parse_code_map("OTHER=some/path", ("LL-004",)), {})
if __name__ == "__main__":
unittest.main()