zoukankan      html  css  js  c++  java
  • pytest常用插件

    1.pytest-html: 生成测试报告
      安装:pip3 install pytest-html
      使用:跟在命令行里,pytest 测试文件  --html=路径/xx.html


    2.pytest-ordering: 控制测试函数运行顺序
      使用:@pytest.mark.run(order=x)
      x:
      1.全为正数 或者 全为负数 值越小 优先级越高,意味着最先执行
      2.正数和负数同时存在,正数优先级高
      3.值为负数时,优先级低于没被标记的测试方法
      4.值为正数时,优先级高于没被标记的测试方法


    3.pytest-rerunfailures : 失败测试函数重试机制

      使用:在命令行参数中配置:—reruns n
      n:重试次数

  • 相关阅读:
    装饰器的应用
    绑定路由关系
    基本使用
    numpy多项式拟合
    pandas空值处理与插值
    索引
    事务
    子查询
    视图
    自关联
  • 原文地址:https://www.cnblogs.com/crystal1126/p/12392523.html
Copyright © 2011-2022 走看看