@@ -8,22 +8,18 @@ import * as fs from 'fs-extra';
8
8
import * as path from 'path' ;
9
9
import * as sinon from 'sinon' ;
10
10
import * as vscode from 'vscode' ;
11
- import { DeprecatePythonPath } from '../../../../client/common/experiments/groups' ;
12
11
import { FileSystem } from '../../../../client/common/platform/fileSystem' ;
13
- import { IExperimentService } from '../../../../client/common/types' ;
14
12
import { PYTHON_VIRTUAL_ENVS_LOCATION } from '../../../ciConstants' ;
15
13
import {
16
14
PYTHON_PATH ,
17
15
resetGlobalInterpreterPathSetting ,
18
- restorePythonPathInWorkspaceRoot ,
19
16
setGlobalInterpreterPath ,
20
- setPythonPathInWorkspaceRoot ,
21
17
updateSetting ,
22
18
waitForCondition ,
23
19
} from '../../../common' ;
24
20
import { EXTENSION_ROOT_DIR_FOR_TESTS , TEST_TIMEOUT } from '../../../constants' ;
25
21
import { sleep } from '../../../core' ;
26
- import { initialize , initializeTest } from '../../../initialize' ;
22
+ import { initializeTest } from '../../../initialize' ;
27
23
28
24
suite ( 'Activation of Environments in Terminal' , ( ) => {
29
25
const file = path . join (
@@ -57,7 +53,6 @@ suite('Activation of Environments in Terminal', () => {
57
53
} ;
58
54
let terminalSettings : any ;
59
55
let pythonSettings : any ;
60
- let experiments : IExperimentService ;
61
56
const sandbox = sinon . createSandbox ( ) ;
62
57
suiteSetup ( async ( ) => {
63
58
envPaths = await fs . readJson ( envsLocation ) ;
@@ -66,7 +61,6 @@ suite('Activation of Environments in Terminal', () => {
66
61
defaultShell . Windows = terminalSettings . inspect ( 'integrated.defaultProfile.windows' ) . globalValue ;
67
62
defaultShell . Linux = terminalSettings . inspect ( 'integrated.defaultProfile.linux' ) . globalValue ;
68
63
await terminalSettings . update ( 'integrated.defaultProfile.linux' , 'bash' , vscode . ConfigurationTarget . Global ) ;
69
- experiments = ( await initialize ( ) ) . serviceContainer . get < IExperimentService > ( IExperimentService ) ;
70
64
} ) ;
71
65
72
66
setup ( async ( ) => {
@@ -113,11 +107,7 @@ suite('Activation of Environments in Terminal', () => {
113
107
vscode . ConfigurationTarget . Global ,
114
108
) ;
115
109
await pythonSettings . update ( 'condaPath' , undefined , vscode . ConfigurationTarget . Global ) ;
116
- if ( experiments . inExperimentSync ( DeprecatePythonPath . experiment ) ) {
117
- await resetGlobalInterpreterPathSetting ( ) ;
118
- } else {
119
- await restorePythonPathInWorkspaceRoot ( ) ;
120
- }
110
+ await resetGlobalInterpreterPathSetting ( ) ;
121
111
}
122
112
123
113
/**
@@ -158,11 +148,7 @@ suite('Activation of Environments in Terminal', () => {
158
148
vscode . workspace . workspaceFolders ! [ 0 ] . uri ,
159
149
vscode . ConfigurationTarget . WorkspaceFolder ,
160
150
) ;
161
- if ( experiments . inExperimentSync ( DeprecatePythonPath . experiment ) ) {
162
- await setGlobalInterpreterPath ( envPath ) ;
163
- } else {
164
- await setPythonPathInWorkspaceRoot ( envPath ) ;
165
- }
151
+ await setGlobalInterpreterPath ( envPath ) ;
166
152
const content = await openTerminalAndAwaitCommandContent ( waitTimeForActivation , file , outputFile , 5_000 ) ;
167
153
expect ( fileSystem . arePathsSame ( content , envPath ) ) . to . equal ( true , 'Environment not activated' ) ;
168
154
}
0 commit comments