Skip to content

Commit

Permalink
test updates
Browse files Browse the repository at this point in the history
  • Loading branch information
eleanorjboyd committed Feb 7, 2025
1 parent 3259856 commit 3db20de
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ suite('pytest test discovery adapter', () => {
mockProc = new MockChildProcess('', ['']);
execService = typeMoq.Mock.ofType<IPythonExecutionService>();
execService.setup((p) => ((p as unknown) as any).then).returns(() => undefined);
execService.setup((x) => x.getExecutablePath()).returns(() => Promise.resolve('/mock/path/to/python'));
outputChannel = typeMoq.Mock.ofType<ITestOutputChannel>();

const output = new Observable<Output<string>>(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ suite('pytest test execution adapter', () => {

utilsStartRunResultNamedPipeStub = sinon.stub(util, 'startRunResultNamedPipe');
utilsStartRunResultNamedPipeStub.callsFake(() => Promise.resolve('runResultPipe-mockName'));

execService.setup((x) => x.getExecutablePath()).returns(() => Promise.resolve('/mock/path/to/python'));
});
teardown(() => {
sinon.restore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ suite('Unittest test discovery adapter', () => {
},
};
});
execService.setup((x) => x.getExecutablePath()).returns(() => Promise.resolve('/mock/path/to/python'));
execFactory = typeMoq.Mock.ofType<IPythonExecutionFactory>();
deferred = createDeferred();
execFactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ suite('Unittest test execution adapter', () => {

utilsStartRunResultNamedPipeStub = sinon.stub(util, 'startRunResultNamedPipe');
utilsStartRunResultNamedPipeStub.callsFake(() => Promise.resolve('runResultPipe-mockName'));

execService.setup((x) => x.getExecutablePath()).returns(() => Promise.resolve('/mock/path/to/python'));
});
teardown(() => {
sinon.restore();
Expand Down

0 comments on commit 3db20de

Please sign in to comment.