首页
学习
活动
专区
圈层
工具
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    Pytest(6)重复运行用例pytest-repeat「建议收藏」

    安装 pip3 install pytest-repeat 命令行方式 使用--count命令行选项来指定您要运行一个或多个测试的次数: $ pytest --count = 10 test2.py (...configfile: pytest.ini plugins: sugar-0.9.4, rerunfailures-9.1.1, html-3.1.1, metadata-1.11.0, cov-2.10.1, repeat...(count)装饰器: import pytest @pytest.mark.repeat(3) def test_example(): print("执行成功") 执行命令 pytest...test_example(): print("执行成功1") def test_example2(): print("执行成功2") 执行命令 pytest -s --count=2 --repeat-scope...这些测试将始终仅运行一次,而不管是否--count显示并显示警告 更多资料参考【官方文档:https://pypi.org/project/pytest-repeat/】 发布者:全栈程序员栈长,转载请注明出处

    32220
    领券