Closed
Description
Currently, the default value of cwd
is ${workspaceFolder}
, so we assume the tests are being debugged from ${workspaceFolder}
.
We should set cwd
by default pointing it to directory set by test configuration instead. For example for unittest framework with configuration
"python.testing.unittestArgs": [
"-v",
"-s",
"./Tests",
"-p",
"*test_*.py"
],
"python.testing.pytestEnabled": false,
"python.testing.nosetestsEnabled": false,
"python.testing.unittestEnabled": true
We should set "cwd"
as "${workspaceFolder}/Tests"
instead of "${workspaceFolder}
. It helps avoid issues like #7176 (comment) where tests assume they are being run from "${workspaceFolder}/Tests"
directory.
Originally posted by @karrtikr in #7176 (comment)