跳转到主要内容

pytest xdist 分布式测试插件,最重要的是跨多个CPU

项目描述

PyPI version https://img.shields.io/conda/vn/conda-forge/pytest-xdist.svg Python versions https://github.com/pytest-dev/pytest-xdist/workflows/test/badge.svg https://img.shields.io/badge/code%20style-black-000000.svg

pytest-xdist 插件扩展了 pytest 的新测试执行模式,最常用的就是在多个 CPU 上分发测试以加快测试执行速度

pytest -n auto

使用此调用,pytest 将根据可用 CPU 的数量启动一定数量的工作进程,并将测试随机分配到这些进程中。

文档

文档可在 Read The Docs 上找到。

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面