Skip to content

Commit 1ba2b52

Browse files
committed
make stdout in before_script mockable so we can clean up tests
1 parent af32280 commit 1ba2b52

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tmuxp/util.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,11 @@ def run_before_script(script_file):
3030
try:
3131
proc = subprocess.Popen(
3232
shlex.split(str(script_file)),
33-
stderr=subprocess.PIPE
33+
stderr=subprocess.PIPE,
34+
stdout=subprocess.PIPE
3435
)
36+
for line in iter(proc.stdout.readline, b''):
37+
sys.stdout.write(console_to_str(line))
3538
proc.wait()
3639

3740
if proc.returncode:

0 commit comments

Comments
 (0)