From a17d33a99a17d3917bb73e5b8970bcb3b95ff4b4 Mon Sep 17 00:00:00 2001 From: aidoskanapyanov Date: Thu, 13 Apr 2023 11:57:00 +0600 Subject: [PATCH 1/2] Disable coverage when debugging pytest --- src/client/testing/testController/pytest/runner.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/client/testing/testController/pytest/runner.ts b/src/client/testing/testController/pytest/runner.ts index 7bc045b34687..cdf8c059ae72 100644 --- a/src/client/testing/testController/pytest/runner.ts +++ b/src/client/testing/testController/pytest/runner.ts @@ -95,6 +95,10 @@ export class PytestRunner implements ITestsRunner { if (options.debug && !testArgs.some((a) => a.startsWith('--capture') || a === '-s')) { testArgs.push('--capture', 'no'); } + + if (options.debug && !testArgs.some((a) => a.startsWith('--no-cov'))) { + testArgs.push('--no-cov'); + } // Positional arguments control the tests to be run. const rawData = idToRawData.get(testNode.id); From dec6b39d416062dc135f91ce0efd94aaa6bd73c9 Mon Sep 17 00:00:00 2001 From: Aidos Kanapyanov <65722512+aidoskanapyanov@users.noreply.github.com> Date: Tue, 18 Apr 2023 18:33:09 +0000 Subject: [PATCH 2/2] Fix formatting --- src/client/testing/testController/pytest/runner.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/testing/testController/pytest/runner.ts b/src/client/testing/testController/pytest/runner.ts index cdf8c059ae72..8187fe1e60e5 100644 --- a/src/client/testing/testController/pytest/runner.ts +++ b/src/client/testing/testController/pytest/runner.ts @@ -95,7 +95,7 @@ export class PytestRunner implements ITestsRunner { if (options.debug && !testArgs.some((a) => a.startsWith('--capture') || a === '-s')) { testArgs.push('--capture', 'no'); } - + if (options.debug && !testArgs.some((a) => a.startsWith('--no-cov'))) { testArgs.push('--no-cov'); }