mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Revert user settings changes after running Existing Python Install integration test. (#5551)
This commit is contained in:
@@ -45,9 +45,13 @@ describe('Notebook Extension Python Installation', function () {
|
|||||||
|
|
||||||
it('Verify Python Installation', async function () {
|
it('Verify Python Installation', async function () {
|
||||||
should(installComplete).be.true('Python setup did not complete.');
|
should(installComplete).be.true('Python setup did not complete.');
|
||||||
let jupyterPath = JupyterServerInstallation.getPythonInstallPath(jupyterController.jupyterInstallation.apiWrapper);
|
let apiWrapper = jupyterController.jupyterInstallation.apiWrapper;
|
||||||
|
let jupyterPath = JupyterServerInstallation.getPythonInstallPath(apiWrapper);
|
||||||
|
|
||||||
console.log(`Expected python path: '${pythonInstallDir}'; actual: '${jupyterPath}'`);
|
console.log(`Expected python path: '${pythonInstallDir}'; actual: '${jupyterPath}'`);
|
||||||
should(jupyterPath).be.equal(pythonInstallDir);
|
should(jupyterPath).be.equal(pythonInstallDir);
|
||||||
|
should(JupyterServerInstallation.isPythonInstalled(apiWrapper)).be.true();
|
||||||
|
should(JupyterServerInstallation.getExistingPythonSetting(apiWrapper)).be.false();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Use Existing Python Installation', async function () {
|
it('Use Existing Python Installation', async function () {
|
||||||
@@ -63,6 +67,17 @@ describe('Notebook Extension Python Installation', function () {
|
|||||||
console.log('Start Existing Python Installation');
|
console.log('Start Existing Python Installation');
|
||||||
let existingPythonPath = path.join(pythonInstallDir, pythonBundleVersion);
|
let existingPythonPath = path.join(pythonInstallDir, pythonBundleVersion);
|
||||||
await install.startInstallProcess(false, { installPath: existingPythonPath, existingPython: true });
|
await install.startInstallProcess(false, { installPath: existingPythonPath, existingPython: true });
|
||||||
|
let apiWrapper = install.apiWrapper;
|
||||||
|
should(JupyterServerInstallation.isPythonInstalled(apiWrapper)).be.true();
|
||||||
|
should(JupyterServerInstallation.getPythonInstallPath(apiWrapper)).be.equal(existingPythonPath);
|
||||||
|
should(JupyterServerInstallation.getExistingPythonSetting(apiWrapper)).be.true();
|
||||||
|
|
||||||
|
// Redo "new" install to restore original settings.
|
||||||
|
// The actual install should get skipped since it already exists.
|
||||||
|
await install.startInstallProcess(false, { installPath: pythonInstallDir, existingPython: false });
|
||||||
|
should(JupyterServerInstallation.isPythonInstalled(apiWrapper)).be.true();
|
||||||
|
should(JupyterServerInstallation.getPythonInstallPath(apiWrapper)).be.equal(pythonInstallDir);
|
||||||
|
should(JupyterServerInstallation.getExistingPythonSetting(apiWrapper)).be.false();
|
||||||
console.log('Existing Python Installation is done');
|
console.log('Existing Python Installation is done');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user