Skip to main content

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.

Release files for pytest-draw 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-draw 0.1
File Size Uploaded
pytest-draw-0.1.tar.gz 2.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-draw 0.1
File Interpreter ABI Platform
pytest_draw-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 5.8 kB

Release files / pytest-draw-0.1.tar.gz

Download URL pytest-draw-0.1.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e8b47b397e994333091e25886d563687064a9933a7eaa20397a04cef57857499
BLAKE2b-256 checksum
How to use checksums
ecb8a8fe347682724629b6684ed3dda398303cea733c05035cf90875da5e641b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release files / pytest_draw-0.1-py3-none-any.whl

Download URL pytest_draw-0.1-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7979f32cc7533e6ce19604a23d934da4f734d49167161b31e5eca902fcb8f12c
BLAKE2b-256 checksum
How to use checksums
772e419c4264527643397b0f452815d7eb535932b50d51d5d36e8a8e4780909a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page