@@ -48,7 +48,7 @@ suite('Resolver Utils', () => {
4848 teardown ( ( ) => {
4949 sinon . restore ( ) ;
5050 } ) ;
51- function getExpectedPyenvInfo ( ) : PythonEnvInfo | undefined {
51+ function getExpectedPyenvInfo1 ( ) : PythonEnvInfo | undefined {
5252 const envInfo = buildEnvInfo ( {
5353 kind : PythonEnvKind . Pyenv ,
5454 executable : path . join ( testPyenvVersionsDir , '3.9.0' , 'bin' , 'python' ) ,
@@ -65,9 +65,36 @@ suite('Resolver Utils', () => {
6565 return envInfo ;
6666 }
6767
68+ function getExpectedPyenvInfo2 ( ) : PythonEnvInfo | undefined {
69+ const envInfo = buildEnvInfo ( {
70+ kind : PythonEnvKind . Pyenv ,
71+ executable : path . join ( testPyenvVersionsDir , 'miniconda3-4.7.12' , 'bin' , 'python' ) ,
72+ version : {
73+ major : 3 ,
74+ minor : 7 ,
75+ micro : - 1 ,
76+ } ,
77+ source : [ ] ,
78+ org : 'miniconda3' ,
79+ } ) ;
80+ envInfo . location = path . join ( testPyenvVersionsDir , 'miniconda3-4.7.12' ) ;
81+ envInfo . name = 'base' ;
82+ setEnvDisplayString ( envInfo ) ;
83+ return envInfo ;
84+ }
85+
6886 test ( 'resolveEnv' , async ( ) => {
6987 const executablePath = path . join ( testPyenvVersionsDir , '3.9.0' , 'bin' , 'python' ) ;
70- const expected = getExpectedPyenvInfo ( ) ;
88+ const expected = getExpectedPyenvInfo1 ( ) ;
89+
90+ const actual = await resolveBasicEnv ( { executablePath, kind : PythonEnvKind . Pyenv } ) ;
91+ assertEnvEqual ( actual , expected ) ;
92+ } ) ;
93+
94+ test ( 'resolveEnv (base conda env)' , async ( ) => {
95+ sinon . stub ( platformApis , 'getOSType' ) . callsFake ( ( ) => platformApis . OSType . Linux ) ;
96+ const executablePath = path . join ( testPyenvVersionsDir , 'miniconda3-4.7.12' , 'bin' , 'python' ) ;
97+ const expected = getExpectedPyenvInfo2 ( ) ;
7198
7299 const actual = await resolveBasicEnv ( { executablePath, kind : PythonEnvKind . Pyenv } ) ;
73100 assertEnvEqual ( actual , expected ) ;
0 commit comments