@@ -16,6 +16,7 @@ import { IWorkspaceService } from '../../../client/common/application/types';
16
16
import { WorkspaceService } from '../../../client/common/application/workspace' ;
17
17
import { ConfigurationService } from '../../../client/common/configuration/service' ;
18
18
import { STANDARD_OUTPUT_CHANNEL } from '../../../client/common/constants' ;
19
+ import { Logger } from '../../../client/common/logger' ;
19
20
import { PersistentStateFactory } from '../../../client/common/persistentState' ;
20
21
import { IS_WINDOWS } from '../../../client/common/platform/constants' ;
21
22
import { FileSystem } from '../../../client/common/platform/fileSystem' ;
@@ -26,7 +27,7 @@ import { CurrentProcess } from '../../../client/common/process/currentProcess';
26
27
import { ProcessLogger } from '../../../client/common/process/logger' ;
27
28
import { registerTypes as processRegisterTypes } from '../../../client/common/process/serviceRegistry' ;
28
29
import { IProcessLogger , IPythonExecutionFactory , StdErrError } from '../../../client/common/process/types' ;
29
- import { GLOBAL_MEMENTO , IConfigurationService , ICurrentProcess , IDisposableRegistry , IMemento , IOutputChannel , IPathUtils , IPersistentStateFactory , IsWindows , WORKSPACE_MEMENTO } from '../../../client/common/types' ;
30
+ import { GLOBAL_MEMENTO , IConfigurationService , ICurrentProcess , IDisposableRegistry , ILogger , IMemento , IOutputChannel , IPathUtils , IPersistentStateFactory , IsWindows , WORKSPACE_MEMENTO } from '../../../client/common/types' ;
30
31
import { clearCache } from '../../../client/common/utils/cacheUtils' ;
31
32
import { OSType } from '../../../client/common/utils/platform' ;
32
33
import {
@@ -35,6 +36,9 @@ import {
35
36
import { EnvironmentActivationService } from '../../../client/interpreter/activation/service' ;
36
37
import { IEnvironmentActivationService } from '../../../client/interpreter/activation/types' ;
37
38
import { IInterpreterAutoSelectionService , IInterpreterAutoSeletionProxyService } from '../../../client/interpreter/autoSelection/types' ;
39
+ import { ICondaService , IInterpreterService } from '../../../client/interpreter/contracts' ;
40
+ import { InterpreterService } from '../../../client/interpreter/interpreterService' ;
41
+ import { CondaService } from '../../../client/interpreter/locators/services/condaService' ;
38
42
import { InterpreterHashProvider } from '../../../client/interpreter/locators/services/hashProvider' ;
39
43
import { InterpeterHashProviderFactory } from '../../../client/interpreter/locators/services/hashProviderFactory' ;
40
44
import { InterpreterFilter } from '../../../client/interpreter/locators/services/interpreterFilter' ;
@@ -98,9 +102,17 @@ suite('PythonExecutableService', () => {
98
102
serviceManager . addSingleton < IPersistentStateFactory > ( IPersistentStateFactory , PersistentStateFactory ) ;
99
103
serviceManager . addSingleton < Memento > ( IMemento , MockMemento , GLOBAL_MEMENTO ) ;
100
104
serviceManager . addSingleton < Memento > ( IMemento , MockMemento , WORKSPACE_MEMENTO ) ;
105
+
106
+ serviceManager . addSingleton < ICondaService > ( ICondaService , CondaService ) ;
107
+ serviceManager . addSingleton < ILogger > ( ILogger , Logger ) ;
108
+
101
109
processRegisterTypes ( serviceManager ) ;
102
110
variablesRegisterTypes ( serviceManager ) ;
103
111
112
+ const mockInterpreterService = mock ( InterpreterService ) ;
113
+ when ( mockInterpreterService . hasInterpreters ) . thenResolve ( false ) ;
114
+ serviceManager . addSingletonInstance < IInterpreterService > ( IInterpreterService , instance ( mockInterpreterService ) ) ;
115
+
104
116
const mockEnvironmentActivationService = mock ( EnvironmentActivationService ) ;
105
117
when ( mockEnvironmentActivationService . getActivatedEnvironmentVariables ( anything ( ) ) ) . thenResolve ( ) ;
106
118
serviceManager . addSingletonInstance < IEnvironmentActivationService > ( IEnvironmentActivationService , instance ( mockEnvironmentActivationService ) ) ;
0 commit comments