@@ -8,22 +8,18 @@ import * as fs from 'fs-extra';
88import * as path from 'path' ;
99import * as sinon from 'sinon' ;
1010import * as vscode from 'vscode' ;
11- import { DeprecatePythonPath } from '../../../../client/common/experiments/groups' ;
1211import { FileSystem } from '../../../../client/common/platform/fileSystem' ;
13- import { IExperimentService } from '../../../../client/common/types' ;
1412import { PYTHON_VIRTUAL_ENVS_LOCATION } from '../../../ciConstants' ;
1513import {
1614 PYTHON_PATH ,
1715 resetGlobalInterpreterPathSetting ,
18- restorePythonPathInWorkspaceRoot ,
1916 setGlobalInterpreterPath ,
20- setPythonPathInWorkspaceRoot ,
2117 updateSetting ,
2218 waitForCondition ,
2319} from '../../../common' ;
2420import { EXTENSION_ROOT_DIR_FOR_TESTS , TEST_TIMEOUT } from '../../../constants' ;
2521import { sleep } from '../../../core' ;
26- import { initialize , initializeTest } from '../../../initialize' ;
22+ import { initializeTest } from '../../../initialize' ;
2723
2824suite ( 'Activation of Environments in Terminal' , ( ) => {
2925 const file = path . join (
@@ -57,7 +53,6 @@ suite('Activation of Environments in Terminal', () => {
5753 } ;
5854 let terminalSettings : any ;
5955 let pythonSettings : any ;
60- let experiments : IExperimentService ;
6156 const sandbox = sinon . createSandbox ( ) ;
6257 suiteSetup ( async ( ) => {
6358 envPaths = await fs . readJson ( envsLocation ) ;
@@ -66,7 +61,6 @@ suite('Activation of Environments in Terminal', () => {
6661 defaultShell . Windows = terminalSettings . inspect ( 'integrated.defaultProfile.windows' ) . globalValue ;
6762 defaultShell . Linux = terminalSettings . inspect ( 'integrated.defaultProfile.linux' ) . globalValue ;
6863 await terminalSettings . update ( 'integrated.defaultProfile.linux' , 'bash' , vscode . ConfigurationTarget . Global ) ;
69- experiments = ( await initialize ( ) ) . serviceContainer . get < IExperimentService > ( IExperimentService ) ;
7064 } ) ;
7165
7266 setup ( async ( ) => {
@@ -113,11 +107,7 @@ suite('Activation of Environments in Terminal', () => {
113107 vscode . ConfigurationTarget . Global ,
114108 ) ;
115109 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 ( ) ;
121111 }
122112
123113 /**
@@ -158,11 +148,7 @@ suite('Activation of Environments in Terminal', () => {
158148 vscode . workspace . workspaceFolders ! [ 0 ] . uri ,
159149 vscode . ConfigurationTarget . WorkspaceFolder ,
160150 ) ;
161- if ( experiments . inExperimentSync ( DeprecatePythonPath . experiment ) ) {
162- await setGlobalInterpreterPath ( envPath ) ;
163- } else {
164- await setPythonPathInWorkspaceRoot ( envPath ) ;
165- }
151+ await setGlobalInterpreterPath ( envPath ) ;
166152 const content = await openTerminalAndAwaitCommandContent ( waitTimeForActivation , file , outputFile , 5_000 ) ;
167153 expect ( fileSystem . arePathsSame ( content , envPath ) ) . to . equal ( true , 'Environment not activated' ) ;
168154 }
0 commit comments