@@ -19,19 +19,15 @@ import { EXTENSION_ROOT_DIR } from '../../../client/common/constants';
1919import { IPlatformService } from '../../../client/common/platform/types' ;
2020import { TerminalService } from '../../../client/common/terminal/service' ;
2121import { ITerminalActivator , ITerminalHelper , TerminalShellType } from '../../../client/common/terminal/types' ;
22- import { IConfigurationService , IDisposableRegistry } from '../../../client/common/types' ;
22+ import { IDisposableRegistry } from '../../../client/common/types' ;
2323import { IServiceContainer } from '../../../client/ioc/types' ;
2424import { ITerminalAutoActivation } from '../../../client/terminals/types' ;
2525import { createPythonInterpreter } from '../../utils/interpreters' ;
2626import * as workspaceApis from '../../../client/common/vscodeApis/workspaceApis' ;
2727import * as platform from '../../../client/common/utils/platform' ;
28- import { IInterpreterService } from '../../../client/interpreter/contracts' ;
29- import { PythonEnvironment } from '../../../client/pythonEnvironments/info' ;
3028
3129suite ( 'Terminal Service' , ( ) => {
3230 let service : TerminalService ;
33- let configService : TypeMoq . IMock < IConfigurationService > ;
34- let interpreterService : TypeMoq . IMock < IInterpreterService > ;
3531 let terminal : TypeMoq . IMock < VSCodeTerminal > ;
3632 let terminalManager : TypeMoq . IMock < ITerminalManager > ;
3733 let terminalHelper : TypeMoq . IMock < ITerminalHelper > ;
@@ -48,23 +44,8 @@ suite('Terminal Service', () => {
4844 let pythonConfig : TypeMoq . IMock < WorkspaceConfiguration > ;
4945 let editorConfig : TypeMoq . IMock < WorkspaceConfiguration > ;
5046 let isWindowsStub : sinon . SinonStub ;
51- // let getPythonVersionStub: sinon.SinonStub;
5247
5348 setup ( ( ) => {
54- configService = TypeMoq . Mock . ofType < IConfigurationService > ( ) ;
55- configService . setup ( ( c ) => c . getSettings ( ) ) . returns ( ( ) => ( { pythonPath : 'pythonPath' } as any ) ) ;
56-
57- // configService.setup((t) => t.getSettings);
58- interpreterService = TypeMoq . Mock . ofType < IInterpreterService > ( ) ;
59- // when(interpreterService.getInterpreterDetails(anything())).thenResolve({
60- // version: { major: 3 },
61- // // eslint-disable-next-line @typescript-eslint/no-explicit-any
62- // } as any);
63-
64- interpreterService
65- . setup ( ( i ) => i . getInterpreterDetails ( TypeMoq . It . isAny ( ) ) )
66- . returns ( ( ) => Promise . resolve ( ( { envName : 'base' } as unknown ) as PythonEnvironment ) ) ;
67-
6849 terminal = TypeMoq . Mock . ofType < VSCodeTerminal > ( ) ;
6950 terminalShellIntegration = TypeMoq . Mock . ofType < TerminalShellIntegration > ( ) ;
7051 terminal . setup ( ( t ) => t . shellIntegration ) . returns ( ( ) => terminalShellIntegration . object ) ;
@@ -114,11 +95,8 @@ suite('Terminal Service', () => {
11495 mockServiceContainer . setup ( ( c ) => c . get ( IWorkspaceService ) ) . returns ( ( ) => workspaceService . object ) ;
11596 mockServiceContainer . setup ( ( c ) => c . get ( ITerminalActivator ) ) . returns ( ( ) => terminalActivator . object ) ;
11697 mockServiceContainer . setup ( ( c ) => c . get ( ITerminalAutoActivation ) ) . returns ( ( ) => terminalAutoActivator . object ) ;
117- mockServiceContainer . setup ( ( c ) => c . get ( IConfigurationService ) ) . returns ( ( ) => configService . object ) ;
118- mockServiceContainer . setup ( ( c ) => c . get ( IInterpreterService ) ) . returns ( ( ) => interpreterService . object ) ;
11998 getConfigurationStub = sinon . stub ( workspaceApis , 'getConfiguration' ) ;
12099 isWindowsStub = sinon . stub ( platform , 'isWindows' ) ;
121-
122100 pythonConfig = TypeMoq . Mock . ofType < WorkspaceConfiguration > ( ) ;
123101 editorConfig = TypeMoq . Mock . ofType < WorkspaceConfiguration > ( ) ;
124102 getConfigurationStub . callsFake ( ( section : string ) => {
@@ -256,7 +234,7 @@ suite('Terminal Service', () => {
256234 terminal . verify ( ( t ) => t . sendText ( TypeMoq . It . isValue ( textToSend ) ) , TypeMoq . Times . exactly ( 1 ) ) ;
257235 } ) ;
258236
259- test ( 'Ensure sendText is NOT called when Python shell integration and terminal shell integration are both enabled - Mac, Linux : !Python3.13 ' , async ( ) => {
237+ test ( 'Ensure sendText is NOT called when Python shell integration and terminal shell integration are both enabled - Mac, Linux' , async ( ) => {
260238 isWindowsStub . returns ( false ) ;
261239 pythonConfig
262240 . setup ( ( p ) => p . get ( 'terminal.shellIntegration.enabled' ) )
@@ -278,8 +256,6 @@ suite('Terminal Service', () => {
278256 terminal . verify ( ( t ) => t . sendText ( TypeMoq . It . isValue ( textToSend ) ) , TypeMoq . Times . never ( ) ) ;
279257 } ) ;
280258
281- // Ensure sendText is NOT called when Python shell integration and terminal shell integration are both enabled - Mac, Linux : Python3.13
282-
283259 test ( 'Ensure sendText IS called even when Python shell integration and terminal shell integration are both enabled - Window' , async ( ) => {
284260 isWindowsStub . returns ( true ) ;
285261 pythonConfig
0 commit comments