Skip to content

Commit

Permalink
fixing mocked named pipes
Browse files Browse the repository at this point in the history
  • Loading branch information
eleanorjboyd committed Oct 28, 2024
1 parent 8806d27 commit 1271943
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 26 deletions.
2 changes: 0 additions & 2 deletions python_files/unittestadapter/pvsc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

from typing_extensions import NotRequired # noqa: E402

from testing_tools import socket_manager # noqa: E402

# Types


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,7 @@ suite('pytest test discovery adapter', () => {
mockExtensionRootDir.setup((m) => m.toString()).returns(() => '/mocked/extension/root/dir');

utilsStartDiscoveryNamedPipeStub = sinon.stub(util, 'startDiscoveryNamedPipe');
utilsStartDiscoveryNamedPipeStub.callsFake(() =>
Promise.resolve({
name: 'discoveryResultPipe-mockName',
dispose: () => {
/* no-op */
},
}),
);
utilsStartDiscoveryNamedPipeStub.callsFake(() => Promise.resolve('discoveryResultPipe-mockName'));

// constants
expectedPath = path.join('/', 'my', 'test', 'path');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,7 @@ suite('pytest test execution adapter', () => {
myTestPath = path.join('/', 'my', 'test', 'path', '/');

utilsStartRunResultNamedPipeStub = sinon.stub(util, 'startRunResultNamedPipe');
utilsStartRunResultNamedPipeStub.callsFake(() =>
Promise.resolve({
name: 'runResultPipe-mockName',
dispose: () => {
/* no-op */
},
}),
);
utilsStartRunResultNamedPipeStub.callsFake(() => Promise.resolve('runResultPipe-mockName'));
});
teardown(() => {
sinon.restore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,7 @@ suite('Unittest test execution adapter', () => {
myTestPath = path.join('/', 'my', 'test', 'path', '/');

utilsStartRunResultNamedPipeStub = sinon.stub(util, 'startRunResultNamedPipe');
utilsStartRunResultNamedPipeStub.callsFake(() =>
Promise.resolve({
name: 'runResultPipe-mockName',
dispose: () => {
/* no-op */
},
}),
);
utilsStartRunResultNamedPipeStub.callsFake(() => Promise.resolve('runResultPipe-mockName'));
});
teardown(() => {
sinon.restore();
Expand Down

0 comments on commit 1271943

Please sign in to comment.