MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / initializePython

Function initializePython

src/test/initialize.node.ts:20–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18
19// Ability to use custom python environments for testing
20export async function initializePython() {
21 initializeCommonNodeApi();
22 await setPythonPathInWorkspaceRoot(PYTHON_PATH);
23 // Make sure the python extension can load if this test allows it
24 if (
25 !process.env.VSC_JUPYTER_CI_TEST_DO_NOT_INSTALL_PYTHON_EXT &&
26 process.env.VSC_JUPYTER_CI_TEST_DO_NOT_INSTALL_PYTHON_EXT !== 'false'
27 ) {
28 const extension = vscode.extensions.getExtension(PythonExtension);
29 if (!extension) {
30 console.error('Python extension not found');
31 throw new Error('Python extension not found');
32 }
33 await extension.activate();
34 }
35}
36
37let jupyterServerStarted = false;
38// eslint-disable-next-line @typescript-eslint/no-explicit-any

Callers 2

initializeFunction · 0.85
initializeTestFunction · 0.85

Calls 4

initializeCommonNodeApiFunction · 0.90
errorMethod · 0.65
activateMethod · 0.65

Tested by

no test coverage detected