-
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
VSCode cannot detect pytest unit tests, even pytest has been installed, error comes from inside .vscode-serve folder, behind company's proxy #19556
Comments
@franva Can you try will python version >= 3.7? we dropped support for 3.6. |
@karthiknadig I can't try newer version of Python. It is managed by company, we can only use what is provided. It was working before I upgraded Viscose to the latest version. I used to be using 1.59 version. |
Installed and re-started, the issue persists. 2 Things I'd like to mention: Not sure whether these 2 things are related to the possible cause. The error message remains the same, still complains cannot find pytest inside .vscode-server folder. |
@karrtikr It looks like there is some issue with python selection, can you take a look? |
You can change the interpreter selected using |
Thanks for your help. The issue is solved by selecting python interpreter. Just one suggestion: could we make Python3 the default interpreter if OS has both P2 and P3? Also, one more observation, the Testing button in sidebar sometimes disappeared and I had no way to show it when that happened. |
@franva We should ideally be recommending Python3, can you send a screenshot of the list returned using |
As I can see that it picks up the conda interpreter by default and it has an exclamation mark in front, I do not know what it means. Doesn't look good tho. But the default installed conda is a very old version built in with the system image used by our company on CDSW. So I guess the suggestion is:
|
@franva Thanks for the info, I have ensured interpreters with issues appear towards the end of the list, so they're not autoselected. And we select the first non-conda global interpreters, if no interpreters exist in the workspace. |
Hi @karthiknadig and @karrtikr However, I found another issue and created an issue here: #19642 Hopefully you could also take a look. Many thanks Winston |
Issue Type: Bug
Behaviour
Expected vs. Actual
Expect a list of unit tests, actually got the error message: Error discovering pytest tests (see Output > Python):
Here is the error

One strange thing I notice in the above screenshot is: it always has a "d" inside the search bar under Testing even I closed and re-open VSCode, you can see it from the screenshot above.
Here is the evidence that I have installed the pytest

Here is the error message from Output > Python:
Steps to reproduce:
Diagnostic data
python.languageServer
setting: DefaultOutput for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)User Settings
Extension version: 2022.10.1
VS Code version: Code 1.69.2 (3b889b090b5ad5793f524b5d1d39fda662b96a2a, 2022-07-18T16:12:52.460Z)
OS version: Windows_NT x64 10.0.19042
Restricted Mode: No
Remote OS version: Linux x64 3.10.0-1160.59.1.el7.x86_64
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: