这个问题是pytest设置问题,在settings.xml文件中增加以下配置: { "python.testing.unittestEnabled": false, "python.testing.nosetestsEnabled": false, "python.testing.pytestEnabled": true, "python.testing.autoTestDiscoverOnSaveEnabled": true, "pythonTestExplorer.testFramework": "pytest", } 再确保已经安装...