8000 Default to `--capture=no` when debugging pytest (microsoft/vscode-pyt… · posit-dev/positron@772f9bf · GitHub
[go: up one dir, main page]

Skip to content

Commit 772f9bf

Browse files
harupywesm
authored andcommitted
Default to --capture=no when debugging pytest (microsoft/vscode-python#19903)
Resolve microsoft/vscode-python#19322.
1 parent e5d2fbd commit 772f9bf

File tree

1 file changed

+4
-0
lines changed
  • extensions/positron-python/src/client/testing/testController/pytest

1 file changed

+4
-0
lines changed

extensions/positron-python/src/client/testing/testController/pytest/runner.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ export class PytestRunner implements ITestsRunner {
9292
testArgs.splice(0, 0, '--rootdir', options.cwd);
9393
}
9494

95+
if (options.debug && !testArgs.some((a) => a.startsWith('--capture') || a === '-s')) {
96+
testArgs.push('--capture', 'no');
97+
}
98+
9599
// Positional arguments control the tests to be run.
96100
const rawData = idToRawData.get(testNode.id);
97101
if (!rawData) {

0 commit comments

Comments
 (0)
0