Skip to content

Commit 03ee6ff

Browse files
author
Kartik Raj
committed
Fix test
1 parent adb226c commit 03ee6ff

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/test/common/terminals/environmentActivationProviders/terminalActivation.testvirtualenvs.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import { FileSystem } from '../../../../client/common/platform/fileSystem';
1212
import { PYTHON_VIRTUAL_ENVS_LOCATION } from '../../../ciConstants';
1313
import {
1414
PYTHON_PATH,
15-
resetGlobalInterpreterPathSetting,
16-
setGlobalInterpreterPath,
15+
restorePythonPathInWorkspaceRoot,
16+
setPythonPathInWorkspaceRoot,
1717
updateSetting,
1818
waitForCondition,
1919
} from '../../../common';
@@ -56,7 +56,6 @@ suite('Activation of Environments in Terminal', () => {
5656
const sandbox = sinon.createSandbox();
5757
suiteSetup(async () => {
5858
envPaths = await fs.readJson(envsLocation);
59-
console.log('Beginning suite', envPaths);
6059
terminalSettings = vscode.workspace.getConfiguration('terminal', vscode.workspace.workspaceFolders![0].uri);
6160
pythonSettings = vscode.workspace.getConfiguration('python', vscode.workspace.workspaceFolders![0].uri);
6261
defaultShell.Windows = terminalSettings.inspect('integrated.defaultProfile.windows').globalValue;
@@ -108,7 +107,7 @@ suite('Activation of Environments in Terminal', () => {
108107
vscode.ConfigurationTarget.Global,
109108
);
110109
await pythonSettings.update('condaPath', undefined, vscode.ConfigurationTarget.Global);
111-
await resetGlobalInterpreterPathSetting();
110+
await restorePythonPathInWorkspaceRoot();
112111
}
113112

114113
/**
@@ -149,9 +148,7 @@ suite('Activation of Environments in Terminal', () => {
149148
vscode.workspace.workspaceFolders![0].uri,
150149
vscode.ConfigurationTarget.WorkspaceFolder,
151150
);
152-
console.log('Setting workspace default interpreter path', envPath);
153-
await setGlobalInterpreterPath(envPath);
154-
console.log('Finished setting workspace default interpreter path', envPath);
151+
await setPythonPathInWorkspaceRoot(envPath);
155152
const content = await openTerminalAndAwaitCommandContent(waitTimeForActivation, file, outputFile, 5_000);
156153
expect(fileSystem.arePathsSame(content, envPath)).to.equal(true, 'Environment not activated');
157154
}

0 commit comments

Comments
 (0)