@@ -12,8 +12,8 @@ import { FileSystem } from '../../../../client/common/platform/fileSystem';
12
12
import { PYTHON_VIRTUAL_ENVS_LOCATION } from '../../../ciConstants' ;
13
13
import {
14
14
PYTHON_PATH ,
15
- resetGlobalInterpreterPathSetting ,
16
- setGlobalInterpreterPath ,
15
+ restorePythonPathInWorkspaceRoot ,
16
+ setPythonPathInWorkspaceRoot ,
17
17
updateSetting ,
18
18
waitForCondition ,
19
19
} from '../../../common' ;
@@ -56,7 +56,6 @@ suite('Activation of Environments in Terminal', () => {
56
56
const sandbox = sinon . createSandbox ( ) ;
57
57
suiteSetup ( async ( ) => {
58
58
envPaths = await fs . readJson ( envsLocation ) ;
59
- console . log ( 'Beginning suite' , envPaths ) ;
60
59
terminalSettings = vscode . workspace . getConfiguration ( 'terminal' , vscode . workspace . workspaceFolders ! [ 0 ] . uri ) ;
61
60
pythonSettings = vscode . workspace . getConfiguration ( 'python' , vscode . workspace . workspaceFolders ! [ 0 ] . uri ) ;
62
61
defaultShell . Windows = terminalSettings . inspect ( 'integrated.defaultProfile.windows' ) . globalValue ;
@@ -108,7 +107,7 @@ suite('Activation of Environments in Terminal', () => {
108
107
vscode . ConfigurationTarget . Global ,
109
108
) ;
110
109
await pythonSettings . update ( 'condaPath' , undefined , vscode . ConfigurationTarget . Global ) ;
111
- await resetGlobalInterpreterPathSetting ( ) ;
110
+ await restorePythonPathInWorkspaceRoot ( ) ;
112
111
}
113
112
114
113
/**
@@ -149,9 +148,7 @@ suite('Activation of Environments in Terminal', () => {
149
148
vscode . workspace . workspaceFolders ! [ 0 ] . uri ,
150
149
vscode . ConfigurationTarget . WorkspaceFolder ,
151
150
) ;
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 ) ;
155
152
const content = await openTerminalAndAwaitCommandContent ( waitTimeForActivation , file , outputFile , 5_000 ) ;
156
153
expect ( fileSystem . arePathsSame ( content , envPath ) ) . to . equal ( true , 'Environment not activated' ) ;
157
154
}
0 commit comments