Skip to main content

A Pytest plugin for running a subset of your tests by splitting them in to equally sized groups.

Project description

https://img.shields.io/pypi/v/pytest-test-groups.svg https://img.shields.io/pypi/pyversions/pytest-test-groups.svg https://github.com/mark-adams/pytest-test-groups/actions/workflows/python-tests.yml/badge.svg

Welcome to pytest-test-groups!

pytest-test-groups allows you to split your test runs into groups of a specific size to make it easier to split up your test runs.

Usage

# Install pytest-test-groups
pip install pytest-test-groups

# Split the tests into 10 groups and run the second group
py.test --test-group-count 10 --test-group=2

# Assign tests pseudo-randomly into 10 groups, and run the second group
py.test --test-group-count 10 --test-group=2 --test-group-random-seed=12345

# Split the tests by files instead of items into 3 groups and run the second group.
# The groups might not be in the same size as each group contains full test files
py.test --test-group-count 10 --test-group=2 --test-group-by filename

Why would I use this?

Sometimes you may have some long running test jobs that take a while to complete. This can be a major headache when trying to run tests quickly. pytest-test-groups allows you to easily say “split my tests into groups of 10 tests and run the second group”. This is primarily useful in the context of CI builds.

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

pytest_test_groups-1.2.1.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

pytest_test_groups-1.2.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file pytest_test_groups-1.2.1.tar.gz.

File metadata

  • Download URL: pytest_test_groups-1.2.1.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pytest_test_groups-1.2.1.tar.gz
Algorithm Hash digest
SHA256 67576b295522fc144b3a42fa1801f50ae962389e984b48bab4336686d09032f1
MD5 ce6a6ff505c193af2b8d832ffd894b04
BLAKE2b-256 9f5ac7874fe15e03d86a1109a3274b57a2473edb8a1dda4a4d27f25d848b6ff5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_test_groups-1.2.1.tar.gz:

Publisher: publish.yml on mark-adams/pytest-test-groups

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pytest_test_groups-1.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_test_groups-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8c7a016448f9ad347fb69a62f417f0a2358ecbf129fe44bc44ee991918a0bb73
MD5 a21916c6f825578d8d862452b2a3917c
BLAKE2b-256 31ff7ff0ca5e8051931bf7fb65e31f085f7c0577615bf3a4776fb583cb471800

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_test_groups-1.2.1-py3-none-any.whl:

Publisher: publish.yml on mark-adams/pytest-test-groups

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page