Skip to content

Commit 13c1f1d

Browse files
committed
fix: handle None stdout/stderr in smoke tests
Add safety checks for None values from subprocess.run() output, which can occur on Windows in certain error conditions.
1 parent 9cd4d11 commit 13c1f1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/smoke/test_smoke.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ def run_promptfoo(
6161
timeout=120, # Increased timeout for npx fallback (first npx call downloads promptfoo)
6262
)
6363

64-
stdout = result.stdout
65-
stderr = result.stderr
64+
stdout = result.stdout or ""
65+
stderr = result.stderr or ""
6666
exit_code = result.returncode
6767

6868
if not expect_error and exit_code != 0:

0 commit comments

Comments
 (0)