Fix clearance checks and document the Terminal-Bench routing flow

This commit is contained in:
Jan Petykiewicz 2026-11-27 19:12:09 -08:00
commit 365c14c59a

View file

@ -32,6 +32,11 @@ def test_port_snapping() -> None:
assert p.y == 1
def test_port_rotation_preserves_coordinates_beyond_int32() -> None:
assert Port(-2**31, 20, 0).rotated(180) == Port(2**31, -20, 180)
assert Port(3_000_000_004, 25, 270).rotated(90, origin=(3_000_000_000, 20)) == Port(2_999_999_995, 24, 0)
@given(p=port_strategy())
def test_port_transform_invariants(p: Port) -> None:
# Rotating 90 degrees 4 times should return to same orientation