admin管理员组文章数量:1026989
The coverage run icon in the Test Explorer is not displayed in Visual Studio Code. Check snapshot. Is There a way to enable coverage on Visual Code interface? I'm using Python pytest and working remotely on a Linux Ubuntu server using Remote-SSH extension. I'm attaching a snapshot of the Testing selection and the 'Settings.json' I have.
.
{
"python.analysis.autoImportCompletions": true,
"python.analysis.fixAll": ["source.unusedImports"],
"editor.defaultFormatter": "charliermarsh.ruff",
"files.exclude": {
"**/__pycache__": true,
"**/.cache": true,
"**/.coverage": true,
"**/.coverage.*": true,
"**/.hypothesis": true,
"**/.mypy_cache": true,
"**/.nox": true,
"**/.pytest_cache": true,
"**/.ruff_cache": true,
"**/.tox": true
},
"python.testing.pytestEnabled": true
}
The coverage run icon in the Test Explorer is not displayed in Visual Studio Code. Check snapshot. Is There a way to enable coverage on Visual Code interface? I'm using Python pytest and working remotely on a Linux Ubuntu server using Remote-SSH extension. I'm attaching a snapshot of the Testing selection and the 'Settings.json' I have.
.
{
"python.analysis.autoImportCompletions": true,
"python.analysis.fixAll": ["source.unusedImports"],
"editor.defaultFormatter": "charliermarsh.ruff",
"files.exclude": {
"**/__pycache__": true,
"**/.cache": true,
"**/.coverage": true,
"**/.coverage.*": true,
"**/.hypothesis": true,
"**/.mypy_cache": true,
"**/.nox": true,
"**/.pytest_cache": true,
"**/.ruff_cache": true,
"**/.tox": true
},
"python.testing.pytestEnabled": true
}
Share Improve this question asked Nov 16, 2024 at 14:06 MichaelMichael 578 bronze badges 01 Answer
Reset to default 1Check whether pytest-cov
is installed.
Add "python.experiments.optInto": ["pythonTestAdapter"]
in user settings.json.
After the plugin is installed, clear python project cache, restart the python extension.
Also check to update VS Code. I had this problem in an older version.
For your reference:
https://code.visualstudio/docs/python/testing#_run-tests-with-coverage
The coverage run icon in the Test Explorer is not displayed in Visual Studio Code. Check snapshot. Is There a way to enable coverage on Visual Code interface? I'm using Python pytest and working remotely on a Linux Ubuntu server using Remote-SSH extension. I'm attaching a snapshot of the Testing selection and the 'Settings.json' I have.
.
{
"python.analysis.autoImportCompletions": true,
"python.analysis.fixAll": ["source.unusedImports"],
"editor.defaultFormatter": "charliermarsh.ruff",
"files.exclude": {
"**/__pycache__": true,
"**/.cache": true,
"**/.coverage": true,
"**/.coverage.*": true,
"**/.hypothesis": true,
"**/.mypy_cache": true,
"**/.nox": true,
"**/.pytest_cache": true,
"**/.ruff_cache": true,
"**/.tox": true
},
"python.testing.pytestEnabled": true
}
The coverage run icon in the Test Explorer is not displayed in Visual Studio Code. Check snapshot. Is There a way to enable coverage on Visual Code interface? I'm using Python pytest and working remotely on a Linux Ubuntu server using Remote-SSH extension. I'm attaching a snapshot of the Testing selection and the 'Settings.json' I have.
.
{
"python.analysis.autoImportCompletions": true,
"python.analysis.fixAll": ["source.unusedImports"],
"editor.defaultFormatter": "charliermarsh.ruff",
"files.exclude": {
"**/__pycache__": true,
"**/.cache": true,
"**/.coverage": true,
"**/.coverage.*": true,
"**/.hypothesis": true,
"**/.mypy_cache": true,
"**/.nox": true,
"**/.pytest_cache": true,
"**/.ruff_cache": true,
"**/.tox": true
},
"python.testing.pytestEnabled": true
}
Share Improve this question asked Nov 16, 2024 at 14:06 MichaelMichael 578 bronze badges 01 Answer
Reset to default 1Check whether pytest-cov
is installed.
Add "python.experiments.optInto": ["pythonTestAdapter"]
in user settings.json.
After the plugin is installed, clear python project cache, restart the python extension.
Also check to update VS Code. I had this problem in an older version.
For your reference:
https://code.visualstudio/docs/python/testing#_run-tests-with-coverage
版权声明:本文标题:python - The coverage run icon in the Test Explorer is not displayed in Visual Studio Code - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745657711a2161697.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论