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.
This commit is contained in:
ZyX 2015-01-16 21:45:48 +03:00
parent d9ed3a3117
commit 9db1e7b76e
1 changed files with 4 additions and 2 deletions

View File

@ -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,
})