Skip to content

Commit 5783026

Browse files
zappolowskitony
authored andcommitted
fix(test_capture_pane): use of double env
This makes the test fail (at least for me) as it still won't start bash but my login-shell (which is not bash).
1 parent 3c71322 commit 5783026

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test_pane.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Tests for libtmux Pane object."""
22
import logging
3+
import shutil
34

45
from libtmux.session import Session
56

@@ -66,10 +67,13 @@ def test_set_width(session: Session) -> None:
6667

6768

6869
def test_capture_pane(session: Session) -> None:
70+
env = shutil.which("env")
71+
assert env is not None, "Cannot find usable `env` in PATH."
72+
6973
session.new_window(
7074
attach=True,
7175
window_name="capture_pane",
72-
window_shell='env -i PS1="$ " /usr/bin/env bash --norc --noprofile',
76+
window_shell=f"{env} PS1='$ ' bash --norc --noprofile",
7377
)
7478
pane = session.attached_window.attached_pane
7579
assert pane is not None

0 commit comments

Comments
 (0)