diff --git a/src/client/application/diagnostics/applicationDiagnostics.ts b/src/client/application/diagnostics/applicationDiagnostics.ts index 725cfe8f8826..62eee04976f1 100644 --- a/src/client/application/diagnostics/applicationDiagnostics.ts +++ b/src/client/application/diagnostics/applicationDiagnostics.ts @@ -22,7 +22,7 @@ export class ApplicationDiagnostics implements IApplicationDiagnostics { } public async performPreStartupHealthCheck(resource: Resource): Promise { // When testing, do not perform health checks, as modal dialogs can be displayed. - if (!isTestExecution()) { + if (isTestExecution()) { return; } const services = this.serviceContainer.getAll(IDiagnosticsService); @@ -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{ + private async runDiagnostics(diagnosticServices: IDiagnosticsService[], resource: Resource): Promise { await Promise.all(diagnosticServices.map(async diagnosticService => { const diagnostics = await diagnosticService.diagnose(resource); if (diagnostics.length > 0) { diff --git a/src/test/application/diagnostics/applicationDiagnostics.unit.test.ts b/src/test/application/diagnostics/applicationDiagnostics.unit.test.ts index 6f3048e1ff75..dba79fc92019 100644 --- a/src/test/application/diagnostics/applicationDiagnostics.unit.test.ts +++ b/src/test/application/diagnostics/applicationDiagnostics.unit.test.ts @@ -30,8 +30,12 @@ suite('Application Diagnostics - ApplicationDiagnostics', () => { let outputChannel: typemoq.IMock; let logger: typemoq.IMock; 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(); envHealthCheck = typemoq.Mock.ofType(); envHealthCheck.setup(service => service.runInBackground).returns(() => true); @@ -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(); sourceMapService.setup(s => s.register()).verifiable(typemoq.Times.once()); diff --git a/src/test/interpreters/autoSelection/index.unit.test.ts b/src/test/interpreters/autoSelection/index.unit.test.ts index 6c7b5eca86be..54ed54b5b13c 100644 --- a/src/test/interpreters/autoSelection/index.unit.test.ts +++ b/src/test/interpreters/autoSelection/index.unit.test.ts @@ -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; diff --git a/src/test/interpreters/autoSelection/rules/workspaceEnv.unit.test.ts b/src/test/interpreters/autoSelection/rules/workspaceEnv.unit.test.ts index 3a3ddf9fc11c..76edd0284207 100644 --- a/src/test/interpreters/autoSelection/rules/workspaceEnv.unit.test.ts +++ b/src/test/interpreters/autoSelection/rules/workspaceEnv.unit.test.ts @@ -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; diff --git a/src/test/interpreters/pipEnvService.unit.test.ts b/src/test/interpreters/pipEnvService.unit.test.ts index 2441dc34bfec..d67f66acaa40 100644 --- a/src/test/interpreters/pipEnvService.unit.test.ts +++ b/src/test/interpreters/pipEnvService.unit.test.ts @@ -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 => { diff --git a/src/test/telemetry/index.unit.test.ts b/src/test/telemetry/index.unit.test.ts index 7bbb7bfbfe07..c3d8632c107e 100644 --- a/src/test/telemetry/index.unit.test.ts +++ b/src/test/telemetry/index.unit.test.ts @@ -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(() => {