A pytest plugin to list worker statistics after a xdist run.
Project description
pytest-xdist-worker-stats
A pytest plugin
Installation
$ pip install pytest-xdist-worker-stats
Usage
All that is needed is to have xdist installed & enabled, and to run tests in multiple workers.
Example output
platform linux -- Python 3.10.11, pytest-7.3.2, pluggy-1.0.0
plugins: xdist-3.3.1, xdist-worker-stats-0.1.0
12 workers [318 items]
............................................................................................................... [ 34%]
............................................................................................................... [ 69%]
................................................................................................ [100%]
================================================= Worker statistics ==================================================
worker gw0 : 11 tests 5.75s runtime
worker gw1 : 10 tests 6.17s runtime
worker gw2 : 8 tests 5.80s runtime
worker gw3 : 21 tests 5.70s runtime
worker gw4 : 16 tests 5.73s runtime
worker gw5 : 9 tests 5.76s runtime
worker gw6 : 12 tests 19.21s runtime
worker gw7 : 48 tests 5.58s runtime
worker gw8 : 17 tests 5.70s runtime
worker gw9 : 78 tests 5.50s runtime
worker gw10 : 41 tests 5.60s runtime
worker gw11 : 47 tests 5.59s runtime
================================================ 318 passed in 26.66s ================================================
Development
Poetry (dependencies) and pre-commit (coding standards) are required for development.
$ poetry install
$ pre-commit install
Thanks
Many thanks to Denys Korytkin for the article How to get data from pytest-xdist nodes.
Changelog
0.1.1 (Jun 15, 2023)
- First Release
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pytest_xdist_worker_stats-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dff57395ff19daff8a3b46a8263370edc27e341e9ecdb11eb4de00391d883ef |
|
MD5 | 2f115e7cd880b7b0a20b00d15f768f3f |
|
BLAKE2b-256 | d834e29b5059c2ddabd115b95aadb6a11ecb86158cceb81b458f500de66da28c |
Close
Hashes for pytest_xdist_worker_stats-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ca1022a12edd73f314bd8df1a65c0ddfd82f7eed69e730398f9c1a6976b392f |
|
MD5 | bb999b5b441d6e8ba630e3e6a1a566d1 |
|
BLAKE2b-256 | b058a4656fe6ba9bbee7a8da2b01ee72b0e2761f53a7d74b668cbda093bfd82c |