We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ce74aa commit 2295b53Copy full SHA for 2295b53
tests/test_session.py
@@ -1,5 +1,6 @@
1
"""Test for libtmux Session object."""
2
import logging
3
+import shutil
4
import typing as t
5
6
import pytest
@@ -260,10 +261,13 @@ def test_cmd_inserts_sesion_id(session: Session) -> None:
260
261
262
263
def test_new_window_with_environment(session: Session) -> None:
264
+ env = shutil.which("env")
265
+ assert env is not None, "Cannot find usable `env` in PATH."
266
+
267
window = session.new_window(
268
attach=True,
269
window_name="window_with_environment",
- window_shell="/usr/bin/env PS1='$ ' bash --norc --noprofile",
270
+ window_shell=f"{env} PS1='$ ' bash --norc --noprofile",
271
environment={"ENV_VAR": "window"},
272
)
273
pane = window.attached_pane
0 commit comments