即使在python测试中发生异常,Bitbucket管道也能成功完成 . 有没有人知道如何在发生异常时使管道失败?

在bitbucket-pipelines.yml中,测试执行如下:

- step:
     name: test
     image: python:latest
     script:
       ...
       - docker run --rm -e latest_build python manage.py test -v2 --noinput