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 edb75ae

Browse filesBrowse files
aduh95marco-ippolito
authored andcommitted
test: use PYTHON executable from env in assertSnapshot
PR-URL: #53938 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent 89599e0 commit edb75ae
Copy full SHA for edb75ae

1 file changed

+5-2Lines changed: 5 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/common/assertSnapshot.js‎

Copy file name to clipboardExpand all lines: test/common/assertSnapshot.js
+5-2Lines 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
const flags = common.parseTestFlags(filename);
81-
const executable = tty ? path.join(__dirname, '../..', 'tools/pseudo-tty.py') : process.execPath;
82-
const args = tty ? [process.execPath, ...flags, filename] : [...flags, filename];
81+
const executable = tty ? (process.env.PYTHON || 'python3') : process.execPath;
82+
const args =
83+
tty ?
84+
[path.join(__dirname, '../..', 'tools/pseudo-tty.py'), process.execPath, ...flags, filename] :
85+
[...flags, filename];
8386
const { stdout, stderr } = await common.spawnPromisified(executable, args, options);
8487
await assertSnapshot(transform(`${stdout}${stderr}`), filename);
8588
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.