Preserve routing coverage and verify release and example regressions

This commit is contained in:
Jan Petykiewicz 2026-11-28 20:57:22 -08:00
commit 8f6a917f51

View file

@ -77,6 +77,26 @@ def test_cpw_turn_builds_wider_exclusion_from_the_verified_envelope() -> None:
assert cpw.gaps.area > 0
def test_cpw_coupling_etch_keeps_two_signal_sections_separate() -> None:
# The two nets abut opposite faces of the authored 5 µm interruption.
nets = (
NetSpec("before", Port(10000, 30000, 0), Port(97500, 30000, 0), 15500),
NetSpec("after", Port(102500, 30000, 0), Port(210000, 30000, 0), 15500),
)
seeds = {"before": PathSeed((StraightSeed(87500),)), "after": PathSeed((StraightSeed(107500),))}
problem = RoutingProblem((0, 0, 220000, 60000), nets, initial_paths=seeds)
run = route(problem, options=_REPLAY)
export = verify_export_grid(problem, run.results_by_net, grid=1)
assert export.is_valid
assembled = union_all([polygon for polygons in export.geometry_by_net.values() for polygon in polygons])
original_metal = box(10000, 22250, 210000, 37750)
coupling_etch = box(97500, 22250, 102500, 37750)
assert assembled.equals(original_metal.difference(coupling_etch))
assert len(assembled.geoms) == 2
assert assembled.union(coupling_etch).equals(original_metal)
def test_profile_options_apply_to_active_search_and_seed_replay() -> None:
flux = NetSpec("flux", Port(35000, 20000, 0), Port(50000, 35000, 90), 29500)
feed = NetSpec("feed", Port(100000, 20000, 0), Port(115000, 35000, 90), 29500)