Skip to content

Commit 7ca9dde

Browse files
zappolowskitony
authored andcommitted
fixup! feat(Window.split_window): set up environment
1 parent dcee32c commit 7ca9dde

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test_window.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Test for libtmux Window object."""
22
import logging
3+
import shutil
34
import time
45
import typing as t
56

@@ -314,9 +315,12 @@ def test_empty_window_name(session: Session) -> None:
314315

315316

316317
def test_split_window_with_environment(session: Session) -> None:
318+
env = shutil.which("env")
319+
assert env is not None, "Cannot find usable `env` in Path."
320+
317321
window = session.new_window(window_name="split_window_with_environment")
318322
pane = window.split_window(
319-
shell="/usr/bin/env PS1='$ ' bash --norc --noprofile",
323+
shell=f"{env} PS1='$ ' bash --norc --noprofile",
320324
environment={"ENV_VAR": "pane"},
321325
)
322326
assert pane is not None

0 commit comments

Comments
 (0)