Skip to content

Some tests call python instead of env.PYTHON #34699

@kapouer

Description

@kapouer

Source node <= 14.7.0

Sorry that i can't do a PR at the moment, but at least the issue is reported.

--- a/test/parallel/test-child-process-set-blocking.js
+++ b/test/parallel/test-child-process-set-blocking.js
@@ -26,7 +26,8 @@

 const SIZE = 100000;

-const cp = ch.spawn('python', ['-c', `print(${SIZE} * "C")`], {
+const python = process.env.PYTHON || 'python';
+const cp = ch.spawn(python, ['-c', `print(${SIZE} * "C")`], {
   stdio: 'inherit'
 });

--- a/test/pummel/test-child-process-spawn-loop.js
+++ b/test/pummel/test-child-process-spawn-loop.js
@@ -30,7 +30,8 @@
 let finished = false;

 function doSpawn(i) {
-  const child = spawn('python', ['-c', `print ${SIZE} * "C"`]);
+  const python = process.env.PYTHON || 'python';
+  const child = spawn(python, ['-c', `print ${SIZE} * "C"`]);
   let count = 0;

   child.stdout.setEncoding('ascii');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions