diff --git a/test/parallel/test-child-process-set-blocking.js b/test/parallel/test-child-process-set-blocking.js index b78b71e545b004..e2620cd84c8506 100644 --- a/test/parallel/test-child-process-set-blocking.js +++ b/test/parallel/test-child-process-set-blocking.js @@ -25,8 +25,9 @@ const assert = require('assert'); const ch = require('child_process'); const SIZE = 100000; +const python = process.env.PYTHON || 'python'; -const cp = ch.spawn('python', ['-c', `print(${SIZE} * "C")`], { +const cp = ch.spawn(python, ['-c', `print(${SIZE} * "C")`], { stdio: 'inherit' }); diff --git a/test/pummel/test-child-process-spawn-loop.js b/test/pummel/test-child-process-spawn-loop.js index 4dc218161125bf..f9f66ce5803840 100644 --- a/test/pummel/test-child-process-spawn-loop.js +++ b/test/pummel/test-child-process-spawn-loop.js @@ -24,13 +24,14 @@ const common = require('../common'); const assert = require('assert'); const spawn = require('child_process').spawn; +const python = process.env.PYTHON || 'python'; const SIZE = 1000 * 1024; const N = 40; let finished = false; function doSpawn(i) { - const child = spawn('python', ['-c', `print(${SIZE} * "C")`]); + const child = spawn(python, ['-c', `print(${SIZE} * "C")`]); let count = 0; child.stdout.setEncoding('ascii');