Skip to content

Commit aa792ea

Browse files
committed
debug test/util
1 parent 51af91b commit aa792ea

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/utils.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,16 @@ def run_command(
5757
)
5858
else:
5959
# List of args (already split)
60-
result = subprocess.run(cmd, env=env, text=True, capture_output=capture_output)
60+
print(f"cmd_env before subprocess: {env=}") # Debug: print env
61+
result = subprocess.run(
62+
cmd,
63+
env=env,
64+
text=True,
65+
capture_output=capture_output,
66+
encoding="utf-8", # Step 1a: Explicit encoding
67+
universal_newlines=True, # Step 1b: Try universal newlines (less critical now with text=True)
68+
bufsize=1, # Step 1c: Line buffering (or 0 for unbuffered - can try 0 too)
69+
)
6170

6271
print(f"Subprocess result: {result=}") # Debug: log result object
6372
if result.returncode != 0:

0 commit comments

Comments
 (0)