-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python.testing.cwd ignored when discovering or running tests using unittest #11425
Comments
@Ark-kun try the latest build (2020.4.76186), we released one today. It should fix an issue with discovering and running tests. If it does not address this issue please let us know. |
Happens to me when just launching the debugger. My Launch target configuration includes a "cwd", but since version 2020.4.74986 it is ignored. Rolled back to 71113, it's working fine. In 71113, when launching (with integrated terminal, Windows 10) it would start the terminal already in the specified cwd. With newer versions, it opens the terminal in the workspace directory and launches the debugger. |
@yandemontreal You can add a test debug configuration and add {
"name": "Debug Config",
"type": "python",
"request": "test",
"cwd": "" // <--- Set this
} |
@yandemontreal You did not mention if you had issue with |
@karthiknadig It is neither. It's just on a plain old "launch" request. And I've always specified cwd. It just stopped working.
|
@yandemontreal created an issue on the debugger on your behalf. Please track it there. |
Closing this, since the original issue with unittest should be addressed in the latest release. @Ark-kun Please let me know if this is not addressed by |
The issues is similar to #8678 , but is about unittest, not pytest
Environment data
"python.jediEnabled"
set to; more info How to update the language server to the latest stable version #3977): Truepython.languageServer
setting: MicrosoftExpected behaviour
Set
python.testing.cwd
to correct directory in Workspace settings.Try discovering tests.
The test discovery uses the provided cwd.
Actual behaviour
The test discovery ignores the provided cwd.
Output for
Python
in theOutput
panel:Here is what I see during test discovery:
(My python.testing.cwd is set to "sdk/python" or "<workspace_root>/sdk/python").
See how the bottom line prints a different value of cwd.
P.S. I'm seeing the above log twice every time I try discovering the tests...
The text was updated successfully, but these errors were encountered: