Closed vigneshmanick closed 1 month ago
@vigneshmanick It seems like you are using a older version of the extension, can you please update?
Thanks for the response.
I am stuck on vscode version 1.85.2 due to glibc requirements (It's a RHEL 7.9 Machine) and i guess the python extension is also tied to that?. When i run check for updates for extension i get the message that it's upto date.
Is this is a known issue in the python extension that has been fixed in a newer version?
apologies for the delay! I will get to this shortly!
Hello! From your logs it seems like you are not on the testing rewrite which may fix this issue. Please switch over and let me know if this helps!
To switch, add this setting to your users settings.json
"python.experiments.optInto": ["pythonTestAdapter"]
. You can confirm you have the rewrite enabled by using the command palette to set "developer set log level" to "trace" then checking for Experiment 'pythonTestAdapter' is active
in your python logs.
Thanks for the response, i can confirm that with changing the pythonTestAdapter
setting the tests are now recognized properly. I can now see all the tests as before.
great!
Behaviour
When navigating to the test explorer for a python project with pytests, the panel errors out.
Expected vs. Actual
test explorer erros out vs showing the tests
Steps to reproduce:
Navigate to the test explorer in a python project with pytests enabled
Diagnostic data
python.languageServer
setting: DefaultOutput for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)``` 2024-05-24 10:57:23.117 [info] Discover tests for workspace name: test_proj - uri: /scratch/user/test_proj 2024-05-24 10:57:23.141 [info] > /scratch/user/myprograms/miniconda3/bin/conda run -p ./.pixi/envs/default --no-capture-output python /scratch/user/VSCode-linux-x64/data/extensions/ms-python.python-2024.2.1/pythonFiles/get_output_via_markers.py /scratch/user/VSCode-linux-x64/data/extensions/ms-python.python-2024.2.1/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir . -s --cache-clear tests 2024-05-24 10:57:23.141 [info] cwd: . 2024-05-24 10:57:24.814 [error] Error discovering pytest tests: [n [Error]: The (legacy) plugin 'activate' is trying to override the built-in command with the same name, which is not allowed. Please uninstall the plugin to stop seeing this error message. at ChildProcess. (/scratch/user/VSCode-linux-x64/data/extensions/ms-python.python-2024.2.1/out/client/extension.js:2:226040)
at Object.onceWrapper (node:events:628:26)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1091:16)
at Socket. (node:internal/child_process:449:11)
at Socket.emit (node:events:513:28)
at Pipe. (node:net:322:12)]
```
User Settings
``` condaPath: "/scratch/user/myprograms/miniconda3" languageServer: "Pylance" testing • pytestArgs: • pytestEnabled: true ```
System information