首页 > 解决方案 > pytest 在警告上失败,但仅在 circleci

问题描述

我有一个 python 项目,我正在使用 circleci 对...进行自动测试

我的 circelci.yml 中的最后一行是:

            python -m pytest tests/ -vv -rsx

当我在计算机上运行此命令时,测试全部通过。

当我在 circelci 上运行它时,我得到:

E   DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses

我知道我最终应该解决这个问题,但是警告不应该导致 pytest 失败,除非我用 -W 要求它...... circleci 会自动抛出 -W 吗?还是发生了其他事情?

标签: python-3.xpytestcircleci

解决方案


推荐阅读