Skip to main content

Pytest plugin for randomly selecting a specific number of tests

Project description

pytest-draw

Pytest plugin for randomly selecting a specific number of tests.

Overview

pytest-draw is a pytest plugin that allows you to randomly select a specific number of tests from your test suite. This can be useful for running a smaller subset of your tests during development or as part of your continuous integration (CI) pipeline.

By default, pytest-draw selects 5 tests to run.

Use Cases

Some potential use cases for pytest-draw include:

  • Running a smaller subset of your tests during development to speed up iteration time
  • Running a specific set of tests as part of your CI pipeline to ensure compatibility with certain environments or configurations
  • Running tests randomly to catch flaky tests or race conditions

Installation

You can install pytest-draw using pip:

pip install pytest-draw

Usage

Once installed, you can use the --draw command-line option to specify the number of tests to randomly select. For example, to randomly select 10 tests from your test suite, you can run:

pytest --draw=10

By default, pytest-draw selects 5 tests. You can specify a different number of tests using the --draw option.

Benefits

Some benefits of using pytest-draw include:

  • Faster iteration time during development by running a smaller subset of your tests
  • Improved test coverage by running tests randomly to catch flaky tests or race conditions
  • Improved reliability of your CI pipeline by running a specific set of tests in certain environments or configurations

How to Contribute

If you would like to contribute to pytest-draw, you can do so by opening a pull request on GitHub. We welcome contributions in the form of bug reports, feature requests, and code changes.

To get started, clone the pytest-draw repository and install the development dependencies:

We appreciate your contributions to pytest-draw and thank you for your support!

License

pytest-draw is licensed under the MIT License.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-draw-0.1.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

pytest_draw-0.1-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file pytest-draw-0.1.tar.gz.

File metadata

  • Download URL: pytest-draw-0.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for pytest-draw-0.1.tar.gz
Algorithm Hash digest
SHA256 e8b47b397e994333091e25886d563687064a9933a7eaa20397a04cef57857499
MD5 27dfc98eb5a35f0cd03b13720bce195b
BLAKE2b-256 ecb8a8fe347682724629b6684ed3dda398303cea733c05035cf90875da5e641b

See more details on using hashes here.

File details

Details for the file pytest_draw-0.1-py3-none-any.whl.

File metadata

  • Download URL: pytest_draw-0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for pytest_draw-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7979f32cc7533e6ce19604a23d934da4f734d49167161b31e5eca902fcb8f12c
MD5 9deb6499006fa1e528955c7c266a2194
BLAKE2b-256 772e419c4264527643397b0f452815d7eb535932b50d51d5d36e8a8e4780909a

See more details on using hashes here.

Supported by

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