Skip to content

Commit

Permalink
IW regression test (#16025)
Browse files Browse the repository at this point in the history
  • Loading branch information
amunger authored Sep 10, 2024
1 parent cb686d8 commit f1fc39c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/test/datascience/interactiveWindow.vscode.common.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,27 @@ ${actualCode}
assert.ok(/tmp-[^\.]*\.py:3/.test(html), 'link to file not found');
});

test('Run code from the input box after running cells from a file', async () => {
// Create a new interactive window
const { activeInteractiveWindow } = await runNewPythonFile(
interactiveWindowProvider,
'# %%\nx = 1\nprint(x)',
disposables
);

// Wait for the last cell to complete
await waitForLastCellToComplete(activeInteractiveWindow, 1, true);

// Run code from the input box
await runInteractiveWindowInput('print("foo")', activeInteractiveWindow, 2);

// Wait for the last cell to complete
const lastCell = await waitForLastCellToComplete(activeInteractiveWindow, 2, true);

// Verify the output
await waitForTextOutput(lastCell, 'foo');
});

test('Raising an exception from within a function has a stack trace', async function () {
const { activeInteractiveWindow } = await runNewPythonFile(
interactiveWindowProvider,
Expand Down

0 comments on commit f1fc39c

Please sign in to comment.