【问题标题】:vscode run all tests (pytest) failsvscode 运行所有测试(pytest)失败
【发布时间】:2020-04-08 22:31:38
【问题描述】:

在 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

有人知道为什么会这样吗?

谢谢

【问题讨论】:

    标签: python visual-studio-code pytest


    【解决方案1】:

    原来 test_xxx.py 文件中的一个导入有错误。在我更改了导入的 pip 包的版本后,它又开始工作了。

    【讨论】:

      猜你喜欢
      • 2019-09-14
      • 1970-01-01
      • 1970-01-01
      • 2020-12-02
      • 1970-01-01
      • 2016-11-02
      • 2016-06-02
      • 2015-02-19
      • 2011-05-09
      相关资源
      最近更新 更多