Skip to content

Commit 49519b5

Browse files
committed
test(builder): version-robust layout-error match
why: tmux's invalid-layout error wording varies by version — "invalid layout: not-a-layout" on 3.7 versus "select-layout: can't set layout: not-a-layout" on 3.2a — so the strict "invalid layout" match passed local 3.7 but failed CI on tmux 3.2a. what: - Match the rejected layout name "not-a-layout" (echoed by both versions) in test_synchronize_restores_state_when_pane_setup_aborts
1 parent 565a968 commit 49519b5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/workspace/test_builder.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2325,7 +2325,10 @@ def after_window_finished(self, window: Window) -> None:
23252325
plugins=plugins,
23262326
)
23272327

2328-
with pytest.raises(LibTmuxException, match="invalid layout"):
2328+
# tmux's invalid-layout wording varies by version ("invalid layout:
2329+
# not-a-layout" on 3.7, "select-layout: can't set layout: not-a-layout"
2330+
# on 3.2a), so match the rejected layout name both versions echo.
2331+
with pytest.raises(LibTmuxException, match="not-a-layout"):
23292332
builder.build(session=session)
23302333

23312334
window = session.windows[0]

0 commit comments

Comments
 (0)