怎么解决VSCode的python插件问题?

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

阅读 6.7k
1 个回答
"python.unitTest.unittestEnabled": true,
"python.unitTest.pyTestEnabled": true,

把这两行改为false

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题