@@ -19,6 +19,8 @@ import { ServiceManager } from '../client/ioc/serviceManager';
1919import { IServiceContainer , IServiceManager } from '../client/ioc/types' ;
2020import { IDiscoveryAPI } from '../client/pythonEnvironments/base/locator' ;
2121import * as pythonDebugger from '../client/debugger/pythonDebugger' ;
22+ import { JupyterExtensionPythonEnvironments , JupyterPythonEnvironmentApi } from '../client/jupyter/jupyterIntegration' ;
23+ import { EventEmitter , type Uri } from 'vscode' ;
2224
2325suite ( 'Extension API' , ( ) => {
2426 const debuggerPath = path . join ( EXTENSION_ROOT_DIR , 'python_files' , 'lib' , 'python' , 'debugpy' ) ;
@@ -49,6 +51,12 @@ suite('Extension API', () => {
4951 instance ( environmentVariablesProvider ) ,
5052 ) ;
5153 when ( serviceContainer . get < IInterpreterService > ( IInterpreterService ) ) . thenReturn ( instance ( interpreterService ) ) ;
54+ const onDidChangePythonEnvironment = new EventEmitter < Uri > ( ) ;
55+ const jupyterApi : JupyterPythonEnvironmentApi = {
56+ onDidChangePythonEnvironment : onDidChangePythonEnvironment . event ,
57+ getPythonEnvironment : ( _uri : Uri ) => undefined ,
58+ } ;
59+ when ( serviceContainer . get < JupyterPythonEnvironmentApi > ( JupyterExtensionPythonEnvironments ) ) . thenReturn ( jupyterApi ) ;
5260 when ( serviceContainer . get < IDisposableRegistry > ( IDisposableRegistry ) ) . thenReturn ( [ ] ) ;
5361 getDebugpyPathStub = sinon . stub ( pythonDebugger , 'getDebugpyPath' ) ;
5462 getDebugpyPathStub . resolves ( debuggerPath ) ;
0 commit comments