Skip to content

Commit

Permalink
Remove use of mocked output channel in virtual workspace (#24051)
Browse files Browse the repository at this point in the history
  • Loading branch information
karthiknadig authored Sep 4, 2024
1 parent 3343560 commit e694910
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/client/extensionInit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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
Expand Down Expand Up @@ -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<ITestOutputChannel>())
: window.createOutputChannel(OutputChannelNames.pythonTest);
const unitTestOutChannel = window.createOutputChannel(OutputChannelNames.pythonTest);
disposables.push(unitTestOutChannel);

serviceManager.addSingletonInstance<ILogOutputChannel>(ILogOutputChannel, standardOutputChannel);
Expand Down

0 comments on commit e694910

Please sign in to comment.