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
4 changes: 2 additions & 2 deletions src/client/application/diagnostics/applicationDiagnostics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class ApplicationDiagnostics implements IApplicationDiagnostics {
}
public async performPreStartupHealthCheck(resource: Resource): Promise<void> {
// When testing, do not perform health checks, as modal dialogs can be displayed.
if (!isTestExecution()) {
if (isTestExecution()) {
return;
}
const services = this.serviceContainer.getAll<IDiagnosticsService>(IDiagnosticsService);
Expand All @@ -31,7 +31,7 @@ export class ApplicationDiagnostics implements IApplicationDiagnostics {
// Perform these validation checks in the background.
this.runDiagnostics(services.filter(item => item.runInBackground), resource).ignoreErrors();
}
private async runDiagnostics(diagnosticServices: IDiagnosticsService[], resource: Resource): Promise<void>{
private async runDiagnostics(diagnosticServices: IDiagnosticsService[], resource: Resource): Promise<void> {
await Promise.all(diagnosticServices.map(async diagnosticService => {
const diagnostics = await diagnosticService.diagnose(resource);
if (diagnostics.length > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ suite('Application Diagnostics - ApplicationDiagnostics', () => {
let outputChannel: typemoq.IMock<IOutputChannel>;
let logger: typemoq.IMock<ILogger>;
let appDiagnostics: IApplicationDiagnostics;
const oldValueOfVSC_PYTHON_UNIT_TEST = process.env.VSC_PYTHON_UNIT_TEST;
const oldValueOfVSC_PYTHON_CI_TEST = process.env.VSC_PYTHON_CI_TEST;

setup(() => {
process.env.VSC_PYTHON_UNIT_TEST = undefined;
process.env.VSC_PYTHON_CI_TEST = undefined;
serviceContainer = typemoq.Mock.ofType<IServiceContainer>();
envHealthCheck = typemoq.Mock.ofType<IDiagnosticsService>();
envHealthCheck.setup(service => service.runInBackground).returns(() => true);
Expand All @@ -52,6 +56,11 @@ suite('Application Diagnostics - ApplicationDiagnostics', () => {
appDiagnostics = new ApplicationDiagnostics(serviceContainer.object, outputChannel.object);
});

teardown(() => {
process.env.VSC_PYTHON_UNIT_TEST = oldValueOfVSC_PYTHON_UNIT_TEST;
process.env.VSC_PYTHON_CI_TEST = oldValueOfVSC_PYTHON_CI_TEST;
});

test('Register should register source maps', () => {
const sourceMapService = typemoq.Mock.ofType<ISourceMapSupportService>();
sourceMapService.setup(s => s.register()).verifiable(typemoq.Times.once());
Expand Down
2 changes: 1 addition & 1 deletion src/test/interpreters/autoSelection/index.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { InterpreterHelper } from '../../../client/interpreter/helpers';

const preferredGlobalInterpreter = 'preferredGlobalPyInterpreter';

suite('xInterpreters - Auto Selection', () => {
suite('Interpreters - Auto Selection', () => {
let autoSelectionService: InterpreterAutoSelectionServiceTest;
let workspaceService: IWorkspaceService;
let stateFactory: IPersistentStateFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import {
import { InterpreterHelper } from '../../../../client/interpreter/helpers';
import { KnownPathsService } from '../../../../client/interpreter/locators/services/KnownPathsService';

suite('xInterpreters - Auto Selection - Workspace Virtual Envs Rule', () => {
suite('Interpreters - Auto Selection - Workspace Virtual Envs Rule', () => {
let rule: WorkspaceVirtualEnvInterpretersAutoSelectionRuleTest;
let stateFactory: IPersistentStateFactory;
let fs: IFileSystem;
Expand Down
2 changes: 1 addition & 1 deletion src/test/interpreters/pipEnvService.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ enum OS {
Mac, Windows, Linux
}

suite('xInterpreters - PipEnv', () => {
suite('Interpreters - PipEnv', () => {
const rootWorkspace = Uri.file(path.join('usr', 'desktop', 'wkspc1')).fsPath;
getNamesAndValues(OS).forEach(os => {
[undefined, Uri.file(path.join(rootWorkspace, 'one.py'))].forEach(resource => {
Expand Down
2 changes: 1 addition & 1 deletion src/test/telemetry/index.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { EXTENSION_ROOT_DIR } from '../../client/constants';
import { sendTelemetryEvent } from '../../client/telemetry';
import { correctPathForOsType } from '../common';

suite('xTelemetry', () => {
suite('Telemetry', () => {
const oldValueOfVSC_PYTHON_UNIT_TEST = process.env.VSC_PYTHON_UNIT_TEST;
const oldValueOfVSC_PYTHON_CI_TEST = process.env.VSC_PYTHON_CI_TEST;
setup(() => {
Expand Down