11import * as assert from 'assert' ;
22import * as path from 'path' ;
33import * as TypeMoq from 'typemoq' ;
4+ import * as sinon from 'sinon' ;
45import { IWorkspaceService } from '../../../../client/common/application/types' ;
56import { FileSystemPaths , FileSystemPathUtils } from '../../../../client/common/platform/fs-paths' ;
67import { IFileSystem , IPlatformService } from '../../../../client/common/platform/types' ;
78import { CondaService } from '../../../../client/pythonEnvironments/common/environmentManagers/condaService' ;
9+ import { Conda } from '../../../../client/pythonEnvironments/common/environmentManagers/conda' ;
810
911suite ( 'Interpreters Conda Service' , ( ) => {
1012 let platformService : TypeMoq . IMock < IPlatformService > ;
@@ -26,7 +28,9 @@ suite('Interpreters Conda Service', () => {
2628 } ) ;
2729
2830 condaService = new CondaService ( platformService . object , fileSystem . object , [ ] , workspaceService . object ) ;
31+ sinon . stub ( Conda , 'getConda' ) . callsFake ( ( ) => Promise . resolve ( undefined ) ) ;
2932 } ) ;
33+ teardown ( ( ) => sinon . restore ( ) ) ;
3034
3135 type InterpreterSearchTestParams = {
3236 pythonPath : string ;
@@ -106,7 +110,7 @@ suite('Interpreters Conda Service', () => {
106110 if ( t . expectedCondaPath . includes ( t . environmentName ) ) {
107111 assert . strictEqual ( condaFile , t . expectedCondaPath ) ;
108112 } else {
109- assert . strictEqual ( condaFile , undefined ) ;
113+ assert . strictEqual ( condaFile , 'conda' ) ;
110114 }
111115 } ) ;
112116 } ) ;
0 commit comments