Skip to content

Failing tests with spaces in path: " Activation Environment" venv tests #14207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ suite('Activation of Environments in Terminal', () => {
): Promise<string> {
const terminal = vscode.window.createTerminal();
await sleep(consoleInitWaitMs);
terminal.sendText(`python ${pythonFile} ${logFile}`, true);
terminal.sendText(`python ${pythonFile.toCommandArgument()} ${logFile.toCommandArgument()}`, true);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple quoting works too

Suggested change
terminal.sendText(`python ${pythonFile.toCommandArgument()} ${logFile.toCommandArgument()}`, true);
terminal.sendText(`python '${pythonFile}' '${logFile}'`, true);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toCommandArgument() is better. When we do the shell work it will be easier to find these.

await waitForCondition(() => fs.pathExists(logFile), logFileCreationWaitMs, `${logFile} file not created.`);

return fs.readFile(logFile, 'utf-8');
Expand Down