@@ -24,9 +24,8 @@ import {
2424import { EXTENSION_ROOT_DIR_FOR_TESTS , TEST_TIMEOUT } from '../../../constants' ;
2525import { sleep } from '../../../core' ;
2626import { initialize , initializeTest } from '../../../initialize' ;
27- import * as ExperimentHelpers from '../../../../client/common/experiments/helpers' ;
2827
29- suite . skip ( 'Activation of Environments in Terminal' , ( ) => {
28+ suite ( 'Activation of Environments in Terminal' , ( ) => {
3029 const file = path . join (
3130 EXTENSION_ROOT_DIR_FOR_TESTS ,
3231 'src' ,
@@ -61,13 +60,12 @@ suite.skip('Activation of Environments in Terminal', () => {
6160 let experiments : IExperimentService ;
6261 const sandbox = sinon . createSandbox ( ) ;
6362 suiteSetup ( async ( ) => {
64- sandbox . stub ( ExperimentHelpers , 'inDiscoveryExperiment' ) . resolves ( false ) ;
6563 envPaths = await fs . readJson ( envsLocation ) ;
6664 terminalSettings = vscode . workspace . getConfiguration ( 'terminal' , vscode . workspace . workspaceFolders ! [ 0 ] . uri ) ;
6765 pythonSettings = vscode . workspace . getConfiguration ( 'python' , vscode . workspace . workspaceFolders ! [ 0 ] . uri ) ;
68- defaultShell . Windows = terminalSettings . inspect ( 'integrated.shell .windows' ) . globalValue ;
69- defaultShell . Linux = terminalSettings . inspect ( 'integrated.shell .linux' ) . globalValue ;
70- await terminalSettings . update ( 'integrated.shell .linux' , '/bin/ bash' , vscode . ConfigurationTarget . Global ) ;
66+ defaultShell . Windows = terminalSettings . inspect ( 'integrated.defaultProfile .windows' ) . globalValue ;
67+ defaultShell . Linux = terminalSettings . inspect ( 'integrated.defaultProfile .linux' ) . globalValue ;
68+ await terminalSettings . update ( 'integrated.defaultProfile .linux' , 'bash' , vscode . ConfigurationTarget . Global ) ;
7169 experiments = ( await initialize ( ) ) . serviceContainer . get < IExperimentService > ( IExperimentService ) ;
7270 } ) ;
7371
@@ -105,11 +103,15 @@ suite.skip('Activation of Environments in Terminal', () => {
105103 vscode . ConfigurationTarget . WorkspaceFolder ,
106104 ) ;
107105 await terminalSettings . update (
108- 'integrated.shell .windows' ,
106+ 'integrated.defaultProfile .windows' ,
109107 defaultShell . Windows ,
110108 vscode . ConfigurationTarget . Global ,
111109 ) ;
112- await terminalSettings . update ( 'integrated.shell.linux' , defaultShell . Linux , vscode . ConfigurationTarget . Global ) ;
110+ await terminalSettings . update (
111+ 'integrated.defaultProfile.linux' ,
112+ defaultShell . Linux ,
113+ vscode . ConfigurationTarget . Global ,
114+ ) ;
113115 await pythonSettings . update ( 'condaPath' , undefined , vscode . ConfigurationTarget . Workspace ) ;
114116 if ( experiments . inExperimentSync ( DeprecatePythonPath . experiment ) ) {
115117 await resetGlobalInterpreterPathSetting ( ) ;
@@ -189,9 +191,10 @@ suite.skip('Activation of Environments in Terminal', () => {
189191 await testActivation ( envPaths . virtualEnvPath ) ;
190192 } ) ;
191193 test ( 'Should activate with conda' , async ( ) => {
194+ // Powershell does not work with conda by default, hence use cmd.
192195 await terminalSettings . update (
193- 'integrated.shell .windows' ,
194- 'C:\\Windows\\System32\\cmd.exe ' ,
196+ 'integrated.defaultProfile .windows' ,
197+ 'Command Prompt ' ,
195198 vscode . ConfigurationTarget . Global ,
196199 ) ;
197200 await pythonSettings . update ( 'condaPath' , envPaths . condaExecPath , vscode . ConfigurationTarget . Workspace ) ;
0 commit comments