MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / test_include_section_sections

Function test_include_section_sections

tests/test_liquid_extractor.py:102–117  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

100
101
102def test_include_section_sections(tmp_path):
103 root = _theme(tmp_path, {
104 "snippets/legacy.liquid": "",
105 "sections/banner.liquid": "",
106 "sections/header-group.json": "{}",
107 "sections/a.liquid": "{% include 'legacy' %}\n{% section 'banner' %}\n{% sections 'header-group' %}\n",
108 })
109 t = _targets(root, "sections/a.liquid")
110 assert t == [
111 ("imports", "snippets/legacy.liquid", "L1"),
112 ("imports", "sections/banner.liquid", "L2"),
113 ("imports", "sections/header-group.json", "L3"),
114 ]
115 result = extract_liquid(root / "sections/a.liquid")
116 json_id = _make_id(str(root / "sections/header-group.json"))
117 assert any(n["id"] == json_id for n in result["nodes"])
118
119
120def test_content_for_block_and_schema_blocks(tmp_path):

Callers

nothing calls this directly

Calls 4

extract_liquidFunction · 0.90
_make_idFunction · 0.90
_themeFunction · 0.70
_targetsFunction · 0.70

Tested by

no test coverage detected