即使测试失败,Pytest也会返回状态代码0

时间:2019-05-18 14:15:29

标签: python batch-file pytest

请考虑以下批处理脚本:

call <somepath>/py.test.exe <someotherpath>/tests
if %errorlevel%==0 (
    echo Tests successful.
) else (
    echo Tests failed.
)

但是,即使pytest测试失败,我也会得到Tests successful。发生了什么事?

0 个答案:

没有答案