Skip to content

Commit f18ee60

Browse files
authored
Don't add cwd arg when running all tests (#17978)
1 parent d4644dc commit f18ee60

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

news/2 Fixes/17546.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix for `pytest` run all tests when using `pytest.ini` and `cwd`.
2+
(thanks [Brian Rutledge](https://github.com/bhrutledge))

src/client/testing/testController/pytest/runner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export class PytestRunner implements ITestsRunner {
9797
if (!rawData) {
9898
throw new Error(`Trying to run unknown node: ${testNode.id}`);
9999
}
100-
if (testNode.id !== options.workspaceFolder.fsPath) {
100+
if (testNode.id !== options.cwd) {
101101
testArgs.push(rawData.rawId);
102102
}
103103

0 commit comments

Comments
 (0)