Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ _Notes on the upcoming release will go here._
via `gp-furo-theme`, a Tailwind v4 respin of Furo, with
`sphinx-vite-builder` handling theme-asset builds (#1037)

### Development

#### Test panes spawn `/bin/sh` instead of the developer's `$SHELL` (#1041)

An autouse pytest fixture pins `$SHELL=/bin/sh` so test panes skip
the contributor's interactive shell init. On systems with slow shell
startup (zsh + oh-my-zsh, heavy bash profiles) this can roughly halve
`uv run py.test` wall time; smaller gain on stripped-down shells. No
effect on tmuxp's runtime behavior.


## tmuxp 1.67.0 (2026-03-08)

Expand Down
14 changes: 14 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@
USING_ZSH = "zsh" in os.getenv("SHELL", "")


@pytest.fixture(autouse=True)
def _pin_test_shell_env(monkeypatch: pytest.MonkeyPatch) -> None:
"""Pin ``$SHELL`` to ``/bin/sh`` for every test.

tmux falls back to ``$SHELL`` for new panes when ``default-shell`` is
unset, so pinning the env var here forces every test pane to spawn
``/bin/sh`` instead of the contributor's interactive shell. Eliminates
rcfile init cost (zsh / oh-my-zsh / bash profile chains) and yields
deterministic prompt output that doesn't flake capture-pane assertions.
``monkeypatch`` restores the prior value at teardown.
"""
monkeypatch.setenv("SHELL", "/bin/sh")


@pytest.fixture(autouse=USING_ZSH, scope="session")
def zshrc(user_path: pathlib.Path) -> pathlib.Path | None:
"""Quiets ZSH default message.
Expand Down