Check predecessor table growth in the short-window regression

This commit is contained in:
Jan Petykiewicz 2026-11-30 10:15:08 -08:00
commit 80f463bf86

View file

@ -46,14 +46,14 @@ def test_automatic_column_routes_use_only_enabled_signed_sbends(sign) -> None:
def test_sbend_sequence_skips_table_growth_for_shifts_larger_than_the_window(monkeypatch) -> None:
make_sequence = Mock(wraps=_columns._BendSequence)
monkeypatch.setattr(_columns, "_BendSequence", make_sequence)
make_state = Mock(wraps=_columns._BendState)
monkeypatch.setattr(_columns, "_BendState", make_state)
choose = _columns._bend_sequences({10: 30}, 25, LENGTH_COST, max_usable=40, weighted=False, sbend_penalty=0)
make_sequence.reset_mock()
make_state.reset_mock()
assert choose(100, 40) is None
assert choose(-100, 40) is None
make_sequence.assert_not_called()
make_state.assert_not_called()
assert choose(-10, 30).offsets == (-10,)