Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "python",
"displayName": "Python",
"description": "IntelliSense (Pylance), Linting, Debugging (multi-threaded, remote), Jupyter Notebooks, code formatting, refactoring, unit tests, and more.",
"version": "2022.18.0-rc",
"version": "2022.18.0",
"featureFlags": {
"usingNewInterpreterStorage": true
},
Expand Down Expand Up @@ -40,7 +40,7 @@
"theme": "dark"
},
"engines": {
"vscode": "^1.68.0"
"vscode": "^1.73.0-insider"
},
"keywords": [
"python",
Expand Down
20 changes: 18 additions & 2 deletions src/test/debuggerTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,29 @@
// Licensed under the MIT License.

import * as path from 'path';
import * as fs from 'fs-extra';
import { runTests } from '@vscode/test-electron';
import { EXTENSION_ROOT_DIR_FOR_TESTS } from './constants';
import { EXTENSION_ROOT_DIR } from '../client/common/constants';

const workspacePath = path.join(__dirname, '..', '..', 'src', 'testMultiRootWkspc', 'multi.code-workspace');
process.env.IS_CI_SERVER_TEST_DEBUGGER = '1';
process.env.VSC_PYTHON_CI_TEST = '1';
const channel = process.env.VSC_PYTHON_CI_TEST_VSC_CHANNEL || 'stable';

function getChannel(): string {
if (process.env.VSC_PYTHON_CI_TEST_VSC_CHANNEL) {
return process.env.VSC_PYTHON_CI_TEST_VSC_CHANNEL;
}

const packageJsonPath = path.join(EXTENSION_ROOT_DIR, 'package.json');
if (fs.pathExistsSync(packageJsonPath)) {
const packageJson = fs.readJSONSync(packageJsonPath);
if (packageJson.engines.vscode.endsWith('insider')) {
return 'insiders';
}
}
return 'stable';
}

function start() {
console.log('*'.repeat(100));
Expand All @@ -17,7 +33,7 @@ function start() {
extensionDevelopmentPath: EXTENSION_ROOT_DIR_FOR_TESTS,
extensionTestsPath: path.join(EXTENSION_ROOT_DIR_FOR_TESTS, 'out', 'test', 'index'),
launchArgs: [workspacePath],
version: channel,
version: getChannel(),
extensionTestsEnv: { ...process.env, UITEST_DISABLE_INSIDERS: '1' },
}).catch((ex) => {
console.error('End Debugger tests (with errors)', ex);
Expand Down
19 changes: 17 additions & 2 deletions src/test/standardTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as fs from 'fs-extra';
import * as os from 'os';
import * as path from 'path';
import { downloadAndUnzipVSCode, resolveCliPathFromVSCodeExecutablePath, runTests } from '@vscode/test-electron';
import { JUPYTER_EXTENSION_ID, PYLANCE_EXTENSION_ID } from '../client/common/constants';
import { EXTENSION_ROOT_DIR, JUPYTER_EXTENSION_ID, PYLANCE_EXTENSION_ID } from '../client/common/constants';
import { EXTENSION_ROOT_DIR_FOR_TESTS } from './constants';

// If running smoke tests, we don't have access to this.
Expand All @@ -27,7 +27,20 @@ const extensionDevelopmentPath = process.env.CODE_EXTENSIONS_PATH
? process.env.CODE_EXTENSIONS_PATH
: EXTENSION_ROOT_DIR_FOR_TESTS;

const channel = process.env.VSC_PYTHON_CI_TEST_VSC_CHANNEL || 'stable';
async function getChannel(): Promise<string> {
if (process.env.VSC_PYTHON_CI_TEST_VSC_CHANNEL) {
return process.env.VSC_PYTHON_CI_TEST_VSC_CHANNEL;
}

const packageJsonPath = path.join(EXTENSION_ROOT_DIR, 'package.json');
if (await fs.pathExists(packageJsonPath)) {
const packageJson = await fs.readJSON(packageJsonPath);
if (packageJson.engines.vscode.endsWith('insider')) {
return 'insiders';
}
}
return 'stable';
}

/**
* Smoke tests & tests running in VSCode require Jupyter extension to be installed.
Expand Down Expand Up @@ -77,6 +90,8 @@ async function installPylanceExtension(vscodeExecutablePath: string) {
async function start() {
console.log('*'.repeat(100));
console.log('Start Standard tests');
const channel = await getChannel();
console.log(`Using ${channel} build of VS Code.`);
const vscodeExecutablePath = await downloadAndUnzipVSCode(channel);
const baseLaunchArgs =
requiresJupyterExtensionToBeInstalled() || requiresPylanceExtensionToBeInstalled()
Expand Down