怎么解决VSCode的python插件问题
1个回答
展开全部
想用VSCode进行Python调试,安装了python插件后,参考Python and VS Code进行设置:
(个人判断应该是unitTest的设置出了问题)
{
// Python specific
"python.pythonPath": "D:\\Program Files\\Python36\\python",
"python.autoComplete.extraPaths": [
"D:\\Program Files\\Python36\\Lib\\site-packages",
"D:\\Program Files\\Python36\\Lib"
],
"python.devOptions": [
"DEBUG"
],
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"python.formatting.provider": "autopep8",
"python.unitTest.unittestEnabled": true,
"python.unitTest.pyTestEnabled": true,
"python.unitTest.nosetestsEnabled": false,
// Extension and editor preferences
"files.insertFinalNewline": true,
"editor.fontFamily": "Fira Mono",
"editor.fontSize": 14,
"editor.rulers": [79],
"editor.roundedSelection": false,
"explorer.openEditors.visible": 0,
"trailing-spaces.trimOnSave": true,
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
".vscode": true,
"**/__pycache__": true,
"**/**/*.pyc": true
}
}
但是每次打开py文件的时候,VS Code都提示“No tests discovered, please check the configuration settings for the tests.”
请问怎么解决这个问题?
谢谢
"python.unitTest.unittestEnabled": true,
"python.unitTest.pyTestEnabled": true,
把这两行改为false
(个人判断应该是unitTest的设置出了问题)
{
// Python specific
"python.pythonPath": "D:\\Program Files\\Python36\\python",
"python.autoComplete.extraPaths": [
"D:\\Program Files\\Python36\\Lib\\site-packages",
"D:\\Program Files\\Python36\\Lib"
],
"python.devOptions": [
"DEBUG"
],
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"python.formatting.provider": "autopep8",
"python.unitTest.unittestEnabled": true,
"python.unitTest.pyTestEnabled": true,
"python.unitTest.nosetestsEnabled": false,
// Extension and editor preferences
"files.insertFinalNewline": true,
"editor.fontFamily": "Fira Mono",
"editor.fontSize": 14,
"editor.rulers": [79],
"editor.roundedSelection": false,
"explorer.openEditors.visible": 0,
"trailing-spaces.trimOnSave": true,
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
".vscode": true,
"**/__pycache__": true,
"**/**/*.pyc": true
}
}
但是每次打开py文件的时候,VS Code都提示“No tests discovered, please check the configuration settings for the tests.”
请问怎么解决这个问题?
谢谢
"python.unitTest.unittestEnabled": true,
"python.unitTest.pyTestEnabled": true,
把这两行改为false
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询