Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a78c638

Browse filesBrowse files
addaleaxBethGriggs
authored andcommitted
test: use process.env.PYTHON to spawn python
Co-authored-by: Jérémy Lal <kapouer@melix.org> Fixes: #34699 PR-URL: #34700 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
1 parent 7ef5591 commit a78c638
Copy full SHA for a78c638

File tree

Expand file treeCollapse file tree

2 files changed

+4
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-2
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-child-process-set-blocking.js
+2-1Lines 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

Collapse file

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

Copy file name to clipboardExpand all lines: test/pummel/test-child-process-spawn-loop.js
+2-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.