From 9db1e7b76e921abdb65a70bf7027cf52b3c3084e Mon Sep 17 00:00:00 2001 From: ZyX Date: Fri, 16 Jan 2015 21:45:48 +0300 Subject: [PATCH] Use tmux executable from fake PATH for running tmux Otherwise with system tmux present it may appear that subprocess.check_call will use it instead. --- tests/test_in_vterm/test_tmux.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_in_vterm/test_tmux.py b/tests/test_in_vterm/test_tmux.py index e3e9fc26..042b7144 100755 --- a/tests/test_in_vterm/test_tmux.py +++ b/tests/test_in_vterm/test_tmux.py @@ -32,12 +32,14 @@ def main(): rows = 50 cols = 200 + tmux_exe = os.path.join(vterm_path, 'tmux') + try: p = ExpectProcess( lib='tests/bot-ci/deps/libvterm/libvterm.so', rows=rows, cols=cols, - cmd='tmux', + cmd=tmux_exe, args=[ # Specify full path to tmux socket (testing tmux instance must # not interfere with user one) @@ -135,7 +137,7 @@ def main(): print(''.join((u(line) for line in ndiff([a], [b])))) return False finally: - check_call(['tmux', '-S', socket_path, 'kill-server'], env={ + check_call([tmux_exe, '-S', socket_path, 'kill-server'], env={ 'PATH': vterm_path, })