Skip to content

Commit c6ff83a

Browse files
authored
Default to --capture=no when debugging pytest (#19903)
Resolve #19322.
1 parent a4de2b8 commit c6ff83a

File tree

1 file changed

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

1 file changed

+4
-0
lines changed

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)