From e6949103f1e3de4c050ade7db10a554e537acf92 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Wed, 4 Sep 2024 11:48:31 -0700 Subject: [PATCH] Remove use of mocked output channel in virtual workspace (#24051) --- src/client/extensionInit.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/client/extensionInit.ts b/src/client/extensionInit.ts index 851bc943cb8d..38b402b3c9de 100644 --- a/src/client/extensionInit.ts +++ b/src/client/extensionInit.ts @@ -5,7 +5,6 @@ import { Container } from 'inversify'; import { Disposable, Memento, window } from 'vscode'; -import { instance, mock } from 'ts-mockito'; import { registerTypes as platformRegisterTypes } from './common/platform/serviceRegistry'; import { registerTypes as processRegisterTypes } from './common/process/serviceRegistry'; import { registerTypes as commonRegisterTypes } from './common/serviceRegistry'; @@ -29,7 +28,6 @@ import * as pythonEnvironments from './pythonEnvironments'; import { IDiscoveryAPI } from './pythonEnvironments/base/locator'; import { registerLogger } from './logging'; import { OutputChannelLogger } from './logging/outputChannelLogger'; -import { WorkspaceService } from './common/application/workspace'; // The code in this module should do nothing more complex than register // objects to DI and simple init (e.g. no side effects). That implies @@ -57,12 +55,7 @@ export function initializeGlobals( disposables.push(standardOutputChannel); disposables.push(registerLogger(new OutputChannelLogger(standardOutputChannel))); - const workspaceService = new WorkspaceService(); - const unitTestOutChannel = - workspaceService.isVirtualWorkspace || !workspaceService.isTrusted - ? // Do not create any test related output UI when using virtual workspaces. - instance(mock()) - : window.createOutputChannel(OutputChannelNames.pythonTest); + const unitTestOutChannel = window.createOutputChannel(OutputChannelNames.pythonTest); disposables.push(unitTestOutChannel); serviceManager.addSingletonInstance(ILogOutputChannel, standardOutputChannel);