Skip to content

Commit dd5de82

Browse files
committed
Fix tests
1 parent 9f84629 commit dd5de82

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/test/api.functional.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import { ServiceManager } from '../client/ioc/serviceManager';
1919
import { IServiceContainer, IServiceManager } from '../client/ioc/types';
2020
import { IDiscoveryAPI } from '../client/pythonEnvironments/base/locator';
2121
import * as pythonDebugger from '../client/debugger/pythonDebugger';
22+
import { JupyterExtensionPythonEnvironments, JupyterPythonEnvironmentApi } from '../client/jupyter/jupyterIntegration';
23+
import { EventEmitter, type Uri } from 'vscode';
2224

2325
suite('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

Comments
 (0)