@@ -7,14 +7,16 @@ import * as sinon from 'sinon';
7
7
import * as typemoq from 'typemoq' ;
8
8
import { assert , use as chaiUse } from 'chai' ;
9
9
import { ConfigurationTarget , Uri } from 'vscode' ;
10
- import { IDisposableRegistry , IInterpreterPathService , IPathUtils } from '../../../client/common/types' ;
10
+ import { IDisposableRegistry , IPathUtils } from '../../../client/common/types' ;
11
11
import * as commandApis from '../../../client/common/vscodeApis/commandApis' ;
12
- import { IInterpreterQuickPick } from '../../../client/interpreter/configuration/types' ;
12
+ import {
13
+ IInterpreterQuickPick ,
14
+ IPythonPathUpdaterServiceManager ,
15
+ } from '../../../client/interpreter/configuration/types' ;
13
16
import { registerCreateEnvironmentFeatures } from '../../../client/pythonEnvironments/creation/createEnvApi' ;
14
17
import * as windowApis from '../../../client/common/vscodeApis/windowApis' ;
15
18
import { handleCreateEnvironmentCommand } from '../../../client/pythonEnvironments/creation/createEnvironment' ;
16
19
import { CreateEnvironmentProvider } from '../../../client/pythonEnvironments/creation/proposed.createEnvApis' ;
17
- import { noop } from '../../core' ;
18
20
19
21
chaiUse ( chaiAsPromised . default ) ;
20
22
@@ -24,7 +26,7 @@ suite('Create Environment APIs', () => {
24
26
let showInformationMessageStub : sinon . SinonStub ;
25
27
const disposables : IDisposableRegistry = [ ] ;
26
28
let interpreterQuickPick : typemoq . IMock < IInterpreterQuickPick > ;
27
- let interpreterPathService : typemoq . IMock < IInterpreterPathService > ;
29
+ let interpreterPathService : typemoq . IMock < IPythonPathUpdaterServiceManager > ;
28
30
let pathUtils : typemoq . IMock < IPathUtils > ;
29
31
30
32
setup ( ( ) => {
@@ -33,7 +35,7 @@ suite('Create Environment APIs', () => {
33
35
34
36
registerCommandStub = sinon . stub ( commandApis , 'registerCommand' ) ;
35
37
interpreterQuickPick = typemoq . Mock . ofType < IInterpreterQuickPick > ( ) ;
36
- interpreterPathService = typemoq . Mock . ofType < IInterpreterPathService > ( ) ;
38
+ interpreterPathService = typemoq . Mock . ofType < IPythonPathUpdaterServiceManager > ( ) ;
37
39
pathUtils = typemoq . Mock . ofType < IPathUtils > ( ) ;
38
40
39
41
registerCommandStub . callsFake ( ( _command : string , _callback : ( ...args : any [ ] ) => any ) => ( {
@@ -49,11 +51,6 @@ suite('Create Environment APIs', () => {
49
51
interpreterQuickPick . object ,
50
52
interpreterPathService . object ,
51
53
pathUtils . object ,
52
- {
53
- getRecommededEnvironment : ( ) => Promise . resolve ( undefined ) ,
54
- registerEnvApi : noop ,
55
- trackUserSelectedEnvironment : noop ,
56
- } ,
57
54
) ;
58
55
} ) ;
59
56
teardown ( ( ) => {
@@ -88,10 +85,11 @@ suite('Create Environment APIs', () => {
88
85
89
86
interpreterPathService
90
87
. setup ( ( p ) =>
91
- p . update (
92
- typemoq . It . isAny ( ) ,
93
- ConfigurationTarget . WorkspaceFolder ,
88
+ p . updatePythonPath (
94
89
typemoq . It . isValue ( '/path/to/env' ) ,
90
+ ConfigurationTarget . WorkspaceFolder ,
91
+ 'ui' ,
92
+ typemoq . It . isAny ( ) ,
95
93
) ,
96
94
)
97
95
. returns ( ( ) => Promise . resolve ( ) )
0 commit comments