@@ -7,6 +7,7 @@ import * as path from 'path';
77import * as assert from 'assert' ;
88import * as fs from 'fs' ;
99import * as os from 'os' ;
10+ import * as sinon from 'sinon' ;
1011import { PytestTestDiscoveryAdapter } from '../../../client/testing/testController/pytest/pytestDiscoveryAdapter' ;
1112import { ITestController , ITestResultResolver } from '../../../client/testing/testController/common/types' ;
1213import { IPythonExecutionFactory } from '../../../client/common/process/types' ;
@@ -22,6 +23,7 @@ import { TestProvider } from '../../../client/testing/types';
2223import { PYTEST_PROVIDER , UNITTEST_PROVIDER } from '../../../client/testing/common/constants' ;
2324import { IEnvironmentVariablesProvider } from '../../../client/common/variables/types' ;
2425import { createTypeMoq } from '../../mocks/helper' ;
26+ import * as pixi from '../../../client/pythonEnvironments/common/environmentManagers/pixi' ;
2527
2628suite ( 'End to End Tests: test adapters' , ( ) => {
2729 let resultResolver : ITestResultResolver ;
@@ -32,6 +34,7 @@ suite('End to End Tests: test adapters', () => {
3234 let workspaceUri : Uri ;
3335 let testOutputChannel : typeMoq . IMock < ITestOutputChannel > ;
3436 let testController : TestController ;
37+ let getPixiStub : sinon . SinonStub ;
3538 const unittestProvider : TestProvider = UNITTEST_PROVIDER ;
3639 const pytestProvider : TestProvider = PYTEST_PROVIDER ;
3740 const rootPathSmallWorkspace = path . join (
@@ -104,6 +107,9 @@ suite('End to End Tests: test adapters', () => {
104107 } ) ;
105108
106109 setup ( async ( ) => {
110+ getPixiStub = sinon . stub ( pixi , 'getPixi' ) ;
111+ getPixiStub . resolves ( undefined ) ;
112+
107113 // create objects that were injected
108114 configService = serviceContainer . get < IConfigurationService > ( IConfigurationService ) ;
109115 pythonExecFactory = serviceContainer . get < IPythonExecutionFactory > ( IPythonExecutionFactory ) ;
@@ -130,6 +136,9 @@ suite('End to End Tests: test adapters', () => {
130136 // Whatever you need to return
131137 } ) ;
132138 } ) ;
139+ teardown ( ( ) => {
140+ sinon . restore ( ) ;
141+ } ) ;
133142 suiteTeardown ( async ( ) => {
134143 // remove symlink
135144 const dest = rootPathDiscoverySymlink ;
0 commit comments