Skip to content

Commit 65ff9e3

Browse files
authored
Register test manager when using the new language server (#2187)
1 parent a002099 commit 65ff9e3

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

news/2 Fixes/2186.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Register test manager when using the new language server.

src/client/activation/languageServer.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ import { isTestExecution, STANDARD_OUTPUT_CHANNEL } from '../common/constants';
1111
import { createDeferred, Deferred } from '../common/helpers';
1212
import { IFileSystem, IPlatformService } from '../common/platform/types';
1313
import { StopWatch } from '../common/stopWatch';
14-
import { IConfigurationService, IExtensionContext, IOutputChannel, IPythonSettings } from '../common/types';
14+
import { IConfigurationService, IExtensionContext, ILogger, IOutputChannel, IPythonSettings } from '../common/types';
1515
import { IServiceContainer } from '../ioc/types';
1616
import {
1717
PYTHON_LANGUAGE_SERVER_DOWNLOADED,
1818
PYTHON_LANGUAGE_SERVER_ENABLED,
1919
PYTHON_LANGUAGE_SERVER_ERROR
2020
} from '../telemetry/constants';
2121
import { getTelemetryReporter } from '../telemetry/telemetry';
22+
import { IUnitTestManagementService } from '../unittests/types';
2223
import { LanguageServerDownloader } from './downloader';
2324
import { InterpreterData, InterpreterDataService } from './interpreterDataService';
2425
import { PlatformData } from './platformData';
@@ -89,6 +90,11 @@ export class LanguageServerExtensionActivator implements IExtensionActivator {
8990
if (!clientOptions) {
9091
return false;
9192
}
93+
94+
const testManagementService = this.services.get<IUnitTestManagementService>(IUnitTestManagementService);
95+
testManagementService.activate()
96+
.catch(ex => this.services.get<ILogger>(ILogger).logError('Failed to activate Unit Tests', ex));
97+
9298
return this.startLanguageServer(clientOptions);
9399
}
94100

0 commit comments

Comments
 (0)