@@ -477,4 +477,55 @@ suite('Terminal Utils - shouldActivateInCurrentTerminal', () => {
477477 'workspaceFolderValue false should take precedence' ,
478478 ) ;
479479 } ) ;
480+
481+ test ( 'should return false when globalRemoteValue is explicitly false' , ( ) => {
482+ pythonConfig . inspect . withArgs ( 'terminal.activateEnvInCurrentTerminal' ) . returns ( {
483+ key : 'terminal.activateEnvInCurrentTerminal' ,
484+ defaultValue : false ,
485+ globalRemoteValue : false ,
486+ globalValue : undefined ,
487+ workspaceValue : undefined ,
488+ workspaceFolderValue : undefined ,
489+ } ) ;
490+
491+ assert . strictEqual (
492+ shouldActivateInCurrentTerminal ( ) ,
493+ false ,
494+ 'Should return false when user explicitly set globalRemoteValue to false' ,
495+ ) ;
496+ } ) ;
497+
498+ test ( 'should return false when globalLocalValue is explicitly false' , ( ) => {
499+ pythonConfig . inspect . withArgs ( 'terminal.activateEnvInCurrentTerminal' ) . returns ( {
500+ key : 'terminal.activateEnvInCurrentTerminal' ,
501+ defaultValue : false ,
502+ globalLocalValue : false ,
503+ globalValue : undefined ,
504+ workspaceValue : undefined ,
505+ workspaceFolderValue : undefined ,
506+ } ) ;
507+
508+ assert . strictEqual (
509+ shouldActivateInCurrentTerminal ( ) ,
510+ false ,
511+ 'Should return false when user explicitly set globalLocalValue to false' ,
512+ ) ;
513+ } ) ;
514+
515+ test ( 'workspaceValue false takes precedence over globalRemoteValue true' , ( ) => {
516+ pythonConfig . inspect . withArgs ( 'terminal.activateEnvInCurrentTerminal' ) . returns ( {
517+ key : 'terminal.activateEnvInCurrentTerminal' ,
518+ defaultValue : false ,
519+ globalRemoteValue : true ,
520+ globalValue : undefined ,
521+ workspaceValue : false ,
522+ workspaceFolderValue : undefined ,
523+ } ) ;
524+
525+ assert . strictEqual (
526+ shouldActivateInCurrentTerminal ( ) ,
527+ false ,
528+ 'workspaceValue false should take precedence over globalRemoteValue true' ,
529+ ) ;
530+ } ) ;
480531} ) ;
0 commit comments