在 vscode 中使用 pytest 运行所有测试失败,并显示以下错误
platform linux -- Python 3.6.9, pytest-5.0.1, py-1.8.0, pluggy-0.13.1
rootdir: /workspace
plugins: cov-2.8.1
Fatal Python error: Aborted
Error: TypeError: Cannot read property 'testsuites' of null
我一直在尝试通过安装各种版本的pytest来修复此错误,但它似乎不起作用。
即使测试发现也会失败并出现以下错误
Test Discovery failed:
Error: free(): invalid pointer
Fatal Python error: Aborted
有谁知道为什么会这样?
谢谢
事实证明,test_xxx.py文件中的一个导入中存在错误。在我更改了导入的 pip 包的版本后,它又开始工作了。