Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: use process.env.PYTHON to spawn python #34700

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test/parallel/test-child-process-set-blocking.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
});

Expand Down
3 changes: 2 additions & 1 deletion test/pummel/test-child-process-spawn-loop.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down