Skip to content

Commit 9cde4eb

Browse files
committed
test: use process.env.PYTHON to spawn python
Co-authored-by: Jérémy Lal <[email protected]> Fixes: #34699 PR-URL: #34700 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ricky Zhou <[email protected]>
1 parent f29ab40 commit 9cde4eb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

test/parallel/test-child-process-set-blocking.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ const assert = require('assert');
2525
const ch = require('child_process');
2626

2727
const SIZE = 100000;
28+
const python = process.env.PYTHON || 'python';
2829

29-
const cp = ch.spawn('python', ['-c', `print(${SIZE} * "C")`], {
30+
const cp = ch.spawn(python, ['-c', `print(${SIZE} * "C")`], {
3031
stdio: 'inherit'
3132
});
3233

test/pummel/test-child-process-spawn-loop.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,14 @@ const common = require('../common');
2424
const assert = require('assert');
2525

2626
const spawn = require('child_process').spawn;
27+
const python = process.env.PYTHON || 'python';
2728

2829
const SIZE = 1000 * 1024;
2930
const N = 40;
3031
let finished = false;
3132

3233
function doSpawn(i) {
33-
const child = spawn('python', ['-c', `print(${SIZE} * "C")`]);
34+
const child = spawn(python, ['-c', `print(${SIZE} * "C")`]);
3435
let count = 0;
3536

3637
child.stdout.setEncoding('ascii');

0 commit comments

Comments
 (0)