Skip to main content

Pytest Dryrun Plugin

A Pytest plugin to ignore tests during collection without reporting them in the test summary.

Installation

With Pip

$ pip install pytest-dryrun
Successfully installed pytest-dryrun-1.0.1

Usage

When the --dryrun flag is passed to Pytest, only tests marked with dryrun will be collected and run.

@pytest.mark.dryrun
def test_thing_one():
    """This test will be run, even during dryruns"""
    box = get_box()
    assert "thing one" in box

def test_thing_two():
    """This test will not by run if the `--dryrun` flag is given to Pytest"""
    box = get_box()
    assert "thing two" in box

Tests can also be marked with dryrun using the library's export, which is helpful for ensuring type-safety.

from pytest_dryrun import dryrun

@dryrun
def test_thing_one():
    box = get_box()
    assert "thing one" in box

If the --no-dryrun flag is given, only tests not marked with dryrun will be collected, meaning that in the example above, only test_thing_two will be run.

The --dryrun and --no-dryrun arguments are mutually-exclusive.

Release files for pytest-dryrun 1.0.2

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-dryrun 1.0.2
File Size Uploaded
pytest_dryrun-1.0.2.tar.gz 2.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-dryrun 1.0.2
File Interpreter ABI Platform
pytest_dryrun-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 6.0 kB

Release files / pytest_dryrun-1.0.2.tar.gz

Download URL pytest_dryrun-1.0.2.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
165b9579572513e2b2e73d5978867bc59ffb6bcb37d4ca0d1abb09c2ff978461
BLAKE2b-256 checksum
How to use checksums
914445dab2f7a12d0ec5e794abde028a56e9e95b4a1aa1a113d7bfee8fdac1e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pytest_dryrun-1.0.2-py3-none-any.whl

Download URL pytest_dryrun-1.0.2-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a916313e4e09e2ec0f9f298ff5a71b5fd728335d55342357aaab8c4472dadb1
BLAKE2b-256 checksum
How to use checksums
9cc449d42c9f53d5adef1cec263eebf557302d7b8428875ca893ada670363f1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.0

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