Skip to content

Commit c4d21f8

Browse files
authored
Re-enable tests skipped during LSP update. (#19248)
1 parent 73cc44b commit c4d21f8

4 files changed

Lines changed: 39 additions & 38 deletions

File tree

src/test/debuggerTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { EXTENSION_ROOT_DIR_FOR_TESTS } from './constants';
88
const workspacePath = path.join(__dirname, '..', '..', 'src', 'testMultiRootWkspc', 'multi.code-workspace');
99
process.env.IS_CI_SERVER_TEST_DEBUGGER = '1';
1010
process.env.VSC_PYTHON_CI_TEST = '1';
11-
const channel = process.env.VSC_PYTHON_CI_TEST_VSC_CHANNEL || 'insiders';
11+
const channel = process.env.VSC_PYTHON_CI_TEST_VSC_CHANNEL || 'stable';
1212

1313
function start() {
1414
console.log('*'.repeat(100));

src/test/multiRootTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ process.env.VSC_PYTHON_CI_TEST = '1';
99

1010
initializeLogger();
1111

12-
const channel = process.env.VSC_PYTHON_CI_TEST_VSC_CHANNEL || 'insiders';
12+
const channel = process.env.VSC_PYTHON_CI_TEST_VSC_CHANNEL || 'stable';
1313

1414
function start() {
1515
console.log('*'.repeat(100));

src/test/standardTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const extensionDevelopmentPath = process.env.CODE_EXTENSIONS_PATH
2727
? process.env.CODE_EXTENSIONS_PATH
2828
: EXTENSION_ROOT_DIR_FOR_TESTS;
2929

30-
const channel = process.env.VSC_PYTHON_CI_TEST_VSC_CHANNEL || 'insiders';
30+
const channel = process.env.VSC_PYTHON_CI_TEST_VSC_CHANNEL || 'stable';
3131

3232
/**
3333
* Smoke tests & tests running in VSCode require Jupyter extension to be installed.

src/test/tensorBoard/nbextensionCodeLensProvider.insiders.test.ts

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import { assert } from 'chai';
55
import * as path from 'path';
66
import * as sinon from 'sinon';
7-
import { env } from 'vscode';
7+
import { CodeLens, commands, env, window } from 'vscode';
88
import { IExperimentService } from '../../client/common/types';
99
import { IServiceManager } from '../../client/ioc/types';
1010
import { TensorBoardNbextensionCodeLensProvider } from '../../client/tensorBoard/nbextensionCodeLensProvider';
@@ -17,6 +17,7 @@ import {
1717
initializeTest,
1818
} from '../initialize';
1919
import { openFile, waitForCondition } from '../common';
20+
import { openNotebook } from '../smoke/common';
2021

2122
suite('TensorBoard code lens provider', () => {
2223
suiteSetup(async function () {
@@ -63,23 +64,23 @@ suite('TensorBoard code lens provider', () => {
6364
);
6465
assert.ok(spy.notCalled, 'Called provideCodeLens for Python file loading tensorboard nbextension');
6566
});
66-
// test('Provide code lens for Python notebook loading and launching tensorboard nbextension', async () => {
67-
// const filePath = path.join(
68-
// EXTENSION_ROOT_DIR_FOR_TESTS,
69-
// 'src',
70-
// 'test',
71-
// 'pythonFiles',
72-
// 'tensorBoard',
73-
// 'tensorboard_nbextension.ipynb',
74-
// );
75-
// const notebook = await openNotebook(filePath);
76-
// assert(window.activeTextEditor, 'No active editor');
77-
// const codeLenses = await commands.executeCommand<CodeLens[]>(
78-
// 'vscode.executeCodeLensProvider',
79-
// notebook.cellAt(0).document.uri,
80-
// );
81-
// assert.ok(codeLenses?.length && codeLenses.length > 0, 'Code lens provider did not provide codelenses');
82-
// });
67+
test('Provide code lens for Python notebook loading and launching tensorboard nbextension', async () => {
68+
const filePath = path.join(
69+
EXTENSION_ROOT_DIR_FOR_TESTS,
70+
'src',
71+
'test',
72+
'pythonFiles',
73+
'tensorBoard',
74+
'tensorboard_nbextension.ipynb',
75+
);
76+
const notebook = await openNotebook(filePath);
77+
assert(window.activeTextEditor, 'No active editor');
78+
const codeLenses = await commands.executeCommand<CodeLens[]>(
79+
'vscode.executeCodeLensProvider',
80+
notebook.cellAt(0).document.uri,
81+
);
82+
assert.ok(codeLenses?.length && codeLenses.length > 0, 'Code lens provider did not provide codelenses');
83+
});
8384
});
8485
suite('Imports', () => {
8586
let codeLensProvider: TensorBoardImportCodeLensProvider;
@@ -120,23 +121,23 @@ suite('TensorBoard code lens provider', () => {
120121
assert.ok(spy.returnValues.length > 0, 'No return values recorded for provideCodeLens');
121122
assert.ok(spy.returnValues[0].length === 1, 'provideCodeLenses did not return codelenses');
122123
});
123-
// test('Provide code lens for Python notebook importing tensorboard', async () => {
124-
// const filePath = path.join(
125-
// EXTENSION_ROOT_DIR_FOR_TESTS,
126-
// 'src',
127-
// 'test',
128-
// 'pythonFiles',
129-
// 'tensorBoard',
130-
// 'tensorboard_import.ipynb',
131-
// );
132-
// const notebook = await openNotebook(filePath);
133-
// assert(window.activeTextEditor, 'No active editor');
134-
// const codeLenses = await commands.executeCommand<CodeLens[]>(
135-
// 'vscode.executeCodeLensProvider',
136-
// notebook.cellAt(0).document.uri,
137-
// );
138-
// assert.ok(codeLenses?.length && codeLenses.length > 0, 'Code lens provider did not provide codelenses');
139-
// });
124+
test('Provide code lens for Python notebook importing tensorboard', async () => {
125+
const filePath = path.join(
126+
EXTENSION_ROOT_DIR_FOR_TESTS,
127+
'src',
128+
'test',
129+
'pythonFiles',
130+
'tensorBoard',
131+
'tensorboard_import.ipynb',
132+
);
133+
const notebook = await openNotebook(filePath);
134+
assert(window.activeTextEditor, 'No active editor');
135+
const codeLenses = await commands.executeCommand<CodeLens[]>(
136+
'vscode.executeCodeLensProvider',
137+
notebook.cellAt(0).document.uri,
138+
);
139+
assert.ok(codeLenses?.length && codeLenses.length > 0, 'Code lens provider did not provide codelenses');
140+
});
140141
test('Does not provide code lens if no matching import', async () => {
141142
await openFile(
142143
path.join(EXTENSION_ROOT_DIR_FOR_TESTS, 'src', 'test', 'pythonFiles', 'tensorBoard', 'noMatch.py'),

0 commit comments

Comments
 (0)