Skip to content

Commit

Permalink
Wait for cell output before testing output (#11754)
Browse files Browse the repository at this point in the history
* Wait for cell output before testing output

* Update src/test/datascience/jupyter/kernels/installationPrompts.vscode.test.ts

Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>

Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
  • Loading branch information
DonJayamanne and rzhao271 authored Oct 24, 2022
1 parent 5c5f1a2 commit 1fd79b5
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -412,11 +412,16 @@ suite('DataScience Install IPyKernel (slow) (install)', function () {
.reverse()
.find((cell) => cell.kind == NotebookCellKind.Code)!;
await waitForExecutionCompletedSuccessfully(lastCodeCell);
const sysExecutable = Uri.file(getCellOutputs(lastCodeCell).trim());

assert.ok(
areInterpreterPathsSame(venvNoRegPath, sysExecutable),
`Python paths do not match ${venvNoRegPath}, ${sysExecutable}.`
let output: string = '';
await waitForCondition(
() => {
output = getCellOutputs(lastCodeCell).trim();
const sysExecutable = Uri.file(getCellOutputs(lastCodeCell).trim());
return areInterpreterPathsSame(venvNoRegPath, sysExecutable);
},
defaultNotebookTestTimeout,
() => `Interpreter path ${venvNoRegPath} not found in output ${output}`
);
});

Expand Down

0 comments on commit 1fd79b5

Please sign in to comment.