pytest文档之-状态码&执行用例方式

本文介绍了pytest运行过程中可能出现的六种状态码及如何在遇到失败时停止测试,详细解析了pytest选择和运行测试的方式,包括通过节点ID、指定模块函数、标记表达式以及从包中运行测试的方法。
摘要由CSDN通过智能技术生成

摘要


  • pytest运行后出现的状态码

  • pytest运行方式

  • pytest操作手册:点击跳转


pytest 运行中出现的6中状态码

Exit code 0: All tests were collected and passed successfully
Exit code 1: Tests were collected and run but some of the tests failed
Exit code 2: Test execution was interrupted by the user
Exit code 3: Internal error happened while executing tests
Exit code 4: pytest command line usage error
Exit code 5: No tests were collected
文档地址

Stopping after the first (or N) failures

pytest -x # stop after first fa

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值