@@ -14,6 +14,7 @@ import { PythonLanguage } from '../../../client/common/constants';
1414import { IFileSystem , IPlatformService } from '../../../client/common/platform/types' ;
1515import { IConfigurationService , IPythonSettings } from '../../../client/common/types' ;
1616import { PythonDebugConfigurationProvider , PythonV2DebugConfigurationProvider } from '../../../client/debugger' ;
17+ import { DebugOptions } from '../../../client/debugger/Common/Contracts' ;
1718import { IServiceContainer } from '../../../client/ioc/types' ;
1819
1920[
@@ -260,24 +261,8 @@ import { IServiceContainer } from '../../../client/ioc/types';
260261
261262 expect ( debugConfig ) . to . have . property ( 'stopOnEntry' , false ) ;
262263 expect ( debugConfig ) . to . have . property ( 'debugOptions' ) ;
263- expect ( ( debugConfig as any ) . debugOptions ) . to . be . deep . equal ( [ 'RedirectOutput' ] ) ;
264- } ) ;
265- test ( 'Test redirection of output' , async ( ) => {
266- if ( provider . debugType === 'python' ) {
267- return ;
268- }
269- const pythonPath = `PythonPath_${ new Date ( ) . toString ( ) } ` ;
270- const workspaceFolder = createMoqWorkspaceFolder ( __dirname ) ;
271- const pythonFile = 'xyz.py' ;
272- setupIoc ( pythonPath ) ;
273- setupActiveEditor ( pythonFile , PythonLanguage . language ) ;
274-
275- const debugConfig = await debugProvider . resolveDebugConfiguration ! ( workspaceFolder , { debugOptions : [ 'RedirectOutput' ] } as any ) ;
276-
277- expect ( debugConfig ) . to . have . property ( 'redirectOutput' ) ;
278- expect ( ( debugConfig as any ) . redirectOutput ) . to . be . equal ( true , 'invalid value' ) ;
264+ expect ( ( debugConfig as any ) . debugOptions ) . to . be . deep . equal ( [ DebugOptions . RedirectOutput ] ) ;
279265 } ) ;
280-
281266 async function testFixFilePathCase ( isWindows : boolean , isMac : boolean , isLinux : boolean ) {
282267 const pythonPath = `PythonPath_${ new Date ( ) . toString ( ) } ` ;
283268 const workspaceFolder = createMoqWorkspaceFolder ( __dirname ) ;
@@ -286,9 +271,11 @@ import { IServiceContainer } from '../../../client/ioc/types';
286271 setupActiveEditor ( pythonFile , PythonLanguage . language ) ;
287272
288273 const debugConfig = await debugProvider . resolveDebugConfiguration ! ( workspaceFolder , { } as DebugConfiguration ) ;
289-
290- expect ( debugConfig ) . to . have . property ( 'fixFilePathCase' ) ;
291- expect ( ( debugConfig as any ) . fixFilePathCase ) . to . be . equal ( isWindows , 'invalid value (true only for windows)' ) ;
274+ if ( isWindows ) {
275+ expect ( debugConfig ) . to . have . property ( 'debugOptions' ) . contains ( DebugOptions . FixFilePathCase ) ;
276+ } else {
277+ expect ( debugConfig ) . to . have . property ( 'debugOptions' ) . not . contains ( DebugOptions . FixFilePathCase ) ;
278+ }
292279 }
293280 test ( 'Test fixFilePathCase for Windows' , async ( ) => {
294281 if ( provider . debugType === 'python' ) {
@@ -318,7 +305,7 @@ import { IServiceContainer } from '../../../client/ioc/types';
318305 setupIoc ( pythonPath , isWindows , isMac , isLinux ) ;
319306 setupActiveEditor ( pythonFile , PythonLanguage . language ) ;
320307
321- const options = addPyramidDebugOption ? { debugOptions : [ ' Pyramid' ] } : { } ;
308+ const options = addPyramidDebugOption ? { debugOptions : [ DebugOptions . Pyramid ] } : { } ;
322309 fileSystem . setup ( fs => fs . fileExistsSync ( TypeMoq . It . isValue ( pythonPath ) ) ) . returns ( ( ) => pythonPathExists ) ;
323310
324311 const debugConfig = await debugProvider . resolveDebugConfiguration ! ( workspaceFolder , options as any as DebugConfiguration ) ;
0 commit comments