test: use python3 instead of python

On some platforms, such as macOS, the `python` command is no longer
available by default.

PR-URL: https://github.com/nodejs/node/pull/44545
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
Luigi Pinca 2022-09-10 15:43:46 +02:00 committed by GitHub
parent 170b4849b0
commit f9bfe785ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,7 +25,7 @@ const assert = require('assert');
const ch = require('child_process');
const SIZE = 100000;
const python = process.env.PYTHON || 'python';
const python = process.env.PYTHON || (common.isWindows ? 'python' : 'python3');
const cp = ch.spawn(python, ['-c', `print(${SIZE} * "C")`], {
stdio: 'inherit'