fix(map): reject a zones layer without a deployment section
The README documents deployment as required when zones exist, but load_map only enforced the reverse direction (deployment without zones). A map with a zones layer and no deployment now fails with MapValidationError instead of loading with unreachable deployment zones.
This commit is contained in:
@@ -111,6 +111,12 @@ def test_rejects_deployment_without_zone(tmp_path: Path) -> None:
|
||||
load_map(_write(tmp_path, body))
|
||||
|
||||
|
||||
def test_rejects_zones_without_deployment(tmp_path: Path) -> None:
|
||||
body = _minimal_map() + "zones: |\n ...\n .A.\n ...\n"
|
||||
with pytest.raises(MapValidationError, match="no deployment section"):
|
||||
load_map(_write(tmp_path, body))
|
||||
|
||||
|
||||
def test_rejects_shared_deployment_zone_letter(tmp_path: Path) -> None:
|
||||
"""Two sides bound to the same zone letter would deploy on top of each
|
||||
other (build_states resets its placed set per side): a data error."""
|
||||
|
||||
Reference in New Issue
Block a user