@@ -28,7 +28,8 @@ import { Architecture } from '../client/common/utils/platform';
2828import { PythonEnvCollectionChangedEvent } from '../client/pythonEnvironments/base/watcher' ;
2929import { normCasePath } from '../client/common/platform/fs-paths' ;
3030import {
31- ActiveEnvironmentIdChangeEvent ,
31+ ActiveEnvironmentPathChangeEvent ,
32+ EnvironmentPath ,
3233 EnvironmentsChangeEvent ,
3334 ProposedExtensionAPI ,
3435} from '../client/proposedApiTypes' ;
@@ -74,7 +75,7 @@ suite('Proposed Extension API', () => {
7475 } ) ;
7576
7677 test ( 'Provide an event to track when active environment details change' , async ( ) => {
77- const events : ActiveEnvironmentIdChangeEvent [ ] = [ ] ;
78+ const events : ActiveEnvironmentPathChangeEvent [ ] = [ ] ;
7879 proposed . environment . onDidChangeActiveEnvironmentPath ( ( e ) => {
7980 events . push ( e ) ;
8081 } ) ;
@@ -91,7 +92,11 @@ suite('Proposed Extension API', () => {
9192 . setup ( ( c ) => c . getSettings ( undefined ) )
9293 . returns ( ( ) => ( ( { pythonPath } as unknown ) as IPythonSettings ) ) ;
9394 const actual = proposed . environment . getActiveEnvironmentPath ( ) ;
94- assert . deepEqual ( actual , { id : normCasePath ( pythonPath ) , path : pythonPath } ) ;
95+ assert . deepEqual ( actual , ( {
96+ id : normCasePath ( pythonPath ) ,
97+ path : pythonPath ,
98+ pathType : 'interpreterPath' ,
99+ } as unknown ) as EnvironmentPath ) ;
95100 } ) ;
96101
97102 test ( 'getActiveEnvironmentPath: default python' , ( ) => {
@@ -100,7 +105,11 @@ suite('Proposed Extension API', () => {
100105 . setup ( ( c ) => c . getSettings ( undefined ) )
101106 . returns ( ( ) => ( ( { pythonPath } as unknown ) as IPythonSettings ) ) ;
102107 const actual = proposed . environment . getActiveEnvironmentPath ( ) ;
103- assert . deepEqual ( actual , { id : 'DEFAULT_PYTHON' , path : pythonPath } ) ;
108+ assert . deepEqual ( actual , ( {
109+ id : 'DEFAULT_PYTHON' ,
110+ path : pythonPath ,
111+ pathType : 'interpreterPath' ,
112+ } as unknown ) as EnvironmentPath ) ;
104113 } ) ;
105114
106115 test ( 'getActiveEnvironmentPath: With resource' , ( ) => {
@@ -110,7 +119,11 @@ suite('Proposed Extension API', () => {
110119 . setup ( ( c ) => c . getSettings ( resource ) )
111120 . returns ( ( ) => ( ( { pythonPath } as unknown ) as IPythonSettings ) ) ;
112121 const actual = proposed . environment . getActiveEnvironmentPath ( resource ) ;
113- assert . deepEqual ( actual , { id : normCasePath ( pythonPath ) , path : pythonPath } ) ;
122+ assert . deepEqual ( actual , ( {
123+ id : normCasePath ( pythonPath ) ,
124+ path : pythonPath ,
125+ pathType : 'interpreterPath' ,
126+ } as unknown ) as EnvironmentPath ) ;
114127 } ) ;
115128
116129 test ( 'resolveEnvironment: invalid environment (when passed as string)' , async ( ) => {
0 commit comments