Skip to content

Commit 0c86597

Browse files
Copilotrchiodo
andauthored
test: assert pytest args are preserved in child attach config
Agent-Logs-Url: https://github.com/microsoft/vscode-python-debugger/sessions/e202ee48-f8d2-4bb4-a5bb-25832c5bd98e Co-authored-by: rchiodo <19672699+rchiodo@users.noreply.github.com>
1 parent f8adfba commit 0c86597

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/test/unittest/hooks/childProcessAttachService.unit.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ suite('Debug - Attach to Child Process', () => {
236236
expect(data).to.have.property('purpose').deep.equal(['debug-test']);
237237
});
238238
test('Child process attach keeps pytest launch fields while removing debug-test purpose', async () => {
239+
const pytestArgs = ['-s', '/workspace/tests/test_multiproc.py'];
239240
const data: AttachRequestArguments = {
240241
request: 'attach',
241242
type: debuggerTypeName,
@@ -244,7 +245,7 @@ suite('Debug - Attach to Child Process', () => {
244245
subProcessId: 2,
245246
purpose: ['debug-test'],
246247
module: 'pytest',
247-
args: ['-s', '${workspaceFolder}/tests/test_multiproc.py'],
248+
args: pytestArgs,
248249
console: 'integratedTerminal',
249250
};
250251
const session: any = {};
@@ -260,7 +261,7 @@ suite('Debug - Attach to Child Process', () => {
260261
module: 'pytest',
261262
console: 'integratedTerminal',
262263
});
263-
expect(secondArg).to.have.property('args').deep.equal(['-s', '${workspaceFolder}/tests/test_multiproc.py']);
264+
expect(secondArg).to.have.property('args').deep.equal(pytestArgs);
264265
expect(secondArg).to.not.have.property('purpose');
265266
});
266267
});

0 commit comments

Comments
 (0)