Skip to content

Commit

Permalink
E@E test: verify useBundledIpykernel equal to false
Browse files Browse the repository at this point in the history
  • Loading branch information
testlabauto committed Feb 20, 2025
1 parent 812d328 commit a5f392e
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions test/e2e/tests/console/console-python.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ test.use({
suiteId: __filename
});

test.describe('Console Pane: Python', { tag: [tags.WEB, tags.CONSOLE] }, () => {
test.describe('Console Pane: Python', { tag: [tags.WEB, tags.CONSOLE, tags.WIN] }, () => {

test('Python - Verify restart button inside the console', {
tag: [tags.WIN]
}, async function ({ app, python }) {
test('Python - Verify restart button inside the console', async function ({ app, python }) {
await expect(async () => {
await app.workbench.quickaccess.runCommand('workbench.action.toggleAuxiliaryBar');
await app.workbench.console.barClearButton.click();
Expand All @@ -31,9 +29,7 @@ test.describe('Console Pane: Python', { tag: [tags.WEB, tags.CONSOLE] }, () => {
}).toPass();
});

test('Python - Verify restart button on console bar', {
tag: [tags.WIN]
}, async function ({ app, python }) {
test('Python - Verify restart button on console bar', async function ({ app, python }) {
// Need to make console bigger to see all bar buttons
await app.workbench.quickaccess.runCommand('workbench.action.toggleAuxiliaryBar');
await app.workbench.console.barClearButton.click();
Expand All @@ -46,9 +42,7 @@ test.describe('Console Pane: Python', { tag: [tags.WEB, tags.CONSOLE] }, () => {
await app.workbench.console.waitForReadyAndStarted('>>>');
});

test('Python - Verify cancel button on console bar', {
tag: [tags.WIN]
}, async function ({ app, python }) {
test('Python - Verify cancel button on console bar', async function ({ app, python }) {

await app.workbench.console.pasteCodeToConsole('import time; time.sleep(10)');
await app.workbench.console.sendEnterKey();
Expand All @@ -57,9 +51,7 @@ test.describe('Console Pane: Python', { tag: [tags.WEB, tags.CONSOLE] }, () => {

});

test('Python - Verify can use multiple interpreter versions', {
tag: [tags.WIN]
}, async function ({ app, python }) {
test('Python - Verify can use multiple interpreter versions', async function ({ app, python }) {

await app.workbench.quickaccess.runCommand('workbench.action.toggleAuxiliaryBar');

Expand All @@ -85,4 +77,20 @@ test.describe('Console Pane: Python', { tag: [tags.WEB, tags.CONSOLE] }, () => {
fail('Secondary Python version not set');
}
});

test('Python - Verify alternate python can skip bundled ipykernel', async function ({ app, python, userSettings }) {

await userSettings.set([['python.useBundledIpykernel', 'false']], true);

const secondaryPython = process.env.POSITRON_PY_ALT_VER_SEL;

if (secondaryPython) {
await app.workbench.interpreter.selectInterpreter(InterpreterType.Python, secondaryPython, true);
await app.workbench.console.barClearButton.click();
await app.workbench.console.pasteCodeToConsole(`import ipykernel; ipykernel.__file__`, true);
await app.workbench.console.waitForConsoleContents('site-packages');
} else {
fail('Secondary Python version not set');
}
});
});

0 comments on commit a5f392e

Please sign in to comment.