想用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.”
请问怎么解决这个问题?
谢谢