Skip to content

Commit 58cb0dd

Browse files
aduh95RafaelGSS
authored andcommitted
test: use PYTHON executable from env in assertSnapshot
PR-URL: #53938 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
1 parent 44a08f7 commit 58cb0dd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎test/common/assertSnapshot.js‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,11 @@ async function spawnAndAssert(filename, transform = (x) => x,{tty = false, ...
7878
return;
7979
}
8080
constflags=common.parseTestFlags(filename);
81-
constexecutable=tty ? path.join(__dirname,'../..','tools/pseudo-tty.py') : process.execPath;
82-
constargs=tty ? [process.execPath, ...flags,filename] : [...flags,filename];
81+
constexecutable=tty ? (process.env.PYTHON||'python3') : process.execPath;
82+
constargs=
83+
tty ?
84+
[path.join(__dirname,'../..','tools/pseudo-tty.py'),process.execPath, ...flags,filename] :
85+
[...flags,filename];
8386
const{ stdout, stderr }=awaitcommon.spawnPromisified(executable,args,options);
8487
awaitassertSnapshot(transform(`${stdout}${stderr}`),filename);
8588
}

0 commit comments

Comments
(0)