S5-5: centralized part-box synthesis (band-y x content-margins)
Add synthesize_part_box() as the single authoritative S5 part-box projection (T3 swap point): content-margin x-extent x part-band y-extent, BOTTOMLEFT coords; label_box retained as a separate anchor. build() attaches box per part. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
@@ -26,7 +26,9 @@ def test_auto_map_matches_spike_physics_template_shape():
|
||||
assert len(result["margins"]) == len(expected["margins"])
|
||||
assert set(result["pages"].keys()) == set(expected["pages"].keys())
|
||||
assert result["pages"]["2"]["role"] == expected["pages"]["2"]["role"]
|
||||
assert result["pages"]["2"]["part_bands"][0].keys() == expected["pages"]["2"]["part_bands"][0].keys()
|
||||
part_band = result["pages"]["2"]["part_bands"][0]
|
||||
assert set(expected["pages"]["2"]["part_bands"][0].keys()).issubset(part_band.keys())
|
||||
assert part_band["box"]
|
||||
|
||||
|
||||
@pytest.mark.skipif(not BORN_DIGITAL_PDF.exists(), reason="born-digital spike PDF not present")
|
||||
|
||||
Reference in New Issue
Block a user