command 'python.runtests' not found
See original GitHub issueEnvironment data
- VS Code version: 1.29.1
- Extension version (available under the Extensions sidebar): 2018.11.0
- OS and version: Windows 10 Enterprise x64
- Python version (& distribution if applicable, e.g. Anaconda): 2.7.13 32-bit
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A
- Relevant/affected Python packages and their versions: pytest 4.0.1
Expected behaviour
Running command with tests (run tests, debug tests, etc.)
Actual behaviour
Popup message in the bottom right corner (with red “X” symbol): command ‘python.runtests’ not found command ‘python.debugtests’ not found command ‘python.discoverTests’ not found command ‘python.runCurrentTestFile’ not found
Steps to reproduce:
Ctrl+Shift+P Choose “Python: Run all unit tests” or “Debug all unit tests” or any other command with testing.
Logs
Output for Python
in the Output
panel is empty when getting this error
Output from Console
is empty.
##Other info:
Reinstalling VS Code didn’t help.
Reinstalling Python package (with reload of VS code of course) didn’t help.
Reboot didn’t help.
Removing C:\Users\_USERDIR_\.vscode\extensions
(and installing then extension again) didn’t help.
pip uninstall pytest + pip install pytest didn’t help.
It looks like the extension installation is corrupted. Am I missing some cache clearing option to fix the issue?
UPD.: my work PC is behind the proxy. It might be valuable
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:8
Top GitHub Comments
VSCode version (1.49.3 user setup) Python extension version: v2020.12.424452561 My
python.languageServer
was set to “Microsoft”, changing it to “Jedi” fixed it so I could discover tests. I don’t remember setting it to “Microsoft” in the first place but I probably did by mistake at some point. NB: I don’t have the Pylance extension installed. Hope this is helpful for someone else.To clarify, this is the Python language server. In my case, I had switched to Pylance but hit an issue, so I switched back by uninstalling Pylance, but I needed to update
python.languageServer
to be “Jedi” instead of “Pylance”.