This commit is contained in:
Rob Lourens
2022-03-09 10:48:11 -08:00
parent 04850d10a8
commit 5a7db04b89
3 changed files with 0 additions and 70 deletions

View File

@@ -902,33 +902,6 @@ const apiTestContentProvider: vscode.NotebookContentProvider = {
assert.strictEqual(executionWasCancelled, true);
});
test('execution cancelled when kernel changed', async () => {
await openRandomNotebookDocument();
let executionWasCancelled = false;
const cancelledKernel = new class extends Kernel {
constructor() {
super('cancelledKernel', '');
}
override async _execute(cells: vscode.NotebookCell[]) {
const [cell] = cells;
const exe = this.controller.createNotebookCellExecution(cell);
exe.token.onCancellationRequested(() => executionWasCancelled = true);
}
};
const notebook = await openRandomNotebookDocument();
await vscode.window.showNotebookDocument(notebook);
testDisposables.push(cancelledKernel.controller);
await assertKernel(cancelledKernel, notebook);
await vscode.commands.executeCommand('notebook.cell.execute');
const newKernel = new Kernel('newKernel', 'kernel');
testDisposables.push(newKernel.controller);
await assertKernel(newKernel, notebook);
assert.strictEqual(executionWasCancelled, true);
});
});
(vscode.env.uiKind === vscode.UIKind.Web ? suite.skip : suite)('statusbar', () => {