Skip to main content

pytest-checkpoint

pytest-checkpoint Logo

Overview

pytest-checkpoint is a plugin for the pytest testing framework that allows developers to restore their testing state from a checkpoint. This feature is particularly useful for long-running test suites, enabling you to pick up where you left off without having to rerun all tests.

Perfect for Interruptible Environments

Running long test suites can be challenging when your environment isn't guaranteed to be stable. For example:

  • Your CI pipeline might time out
  • Your development machine might need a reboot
  • Your cloud instance might be interrupted (i.e. AWS Spot instances)

pytest-checkpoint automatically saves your test progress, so you can pick up exactly where you left off when the system comes back online. This saves valuable time and computing resources, especially in environments where interruptions are common.

Features

  • Checkpoint Restoration: Automatically restore the state of tests from a previously saved checkpoint.
  • Flexible Collection Behavior: Choose how tests are collected when restoring from a checkpoint (deselect or skip).
  • Detailed Logging: Get insights into the checkpointing process with debug logs.

Installation

You can install pytest-checkpoint using pip:

pip install pytest-checkpoint

Usage

To use pytest-checkpoint, you need to add options to your pytest configuration. You can do this by adding the following lines to your pytest.ini or directly in the command line:

[pytest]
addopts =
    -p pytest_checkpoint
    --lap-out .pytest_checkpoint/lap.json
    --collect-behavior skip

or

pytest -p pytest_checkpoint --lap-out .pytest_checkpoint/lap.json --collect-behavior skip

Command Line Options

  • --lap-out: Specify the output file to store lap information for recording a checkpoint. Default is .pytest_checkpoint/lap.json.
  • --collect-behavior: Determines how tests are collected when a checkpoint is restored. Options are deselect or skip.

Example

Run your tests as usual, and the plugin will handle the checkpointing automatically:

pytest

If a test fails or is skipped, the plugin will mark it accordingly in the checkpoint file.

Contributing

We welcome contributions from the community! To contribute to pytest-checkpoint, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and commit them.
  4. Push your branch to your forked repository.
  5. Create a pull request describing your changes.

License

pytest-checkpoint is licensed under the MIT License. See the LICENSE file for more details.

Authors

Acknowledgments

  • Thanks to the pytest community for their support and contributions to the testing ecosystem.

For more information, please refer to the documentation or check the source code in this repository.

Metadata

Release files for pytest-checkpoint 1.1.4

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-checkpoint 1.1.4
File Size Uploaded Provenance Actions
pytest_checkpoint-1.1.4.tar.gz 6.1 kB Without provenance Details for pytest_checkpoint-1.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pytest-checkpoint 1.1.4
File Interpreter ABI Platform Actions
pytest_checkpoint-1.1.4-py3-none-any.whl Python 3 none any Details for pytest_checkpoint-1.1.4-py3-none-any.whl

Total release size: 13.8 kB

Release files / pytest_checkpoint-1.1.4.tar.gz

Download URL pytest_checkpoint-1.1.4.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
858a347bebbc54f39bb08370adf1287af401ef9640bce3618c86f0528c30ed8c
BLAKE2b-256 checksum
How to use checksums
25b3bcb321a7272738a7dbe66ceeb1245f67cff2c4f6f7864ee5a87d70cfc55f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pytest_checkpoint-1.1.4-py3-none-any.whl

Download URL pytest_checkpoint-1.1.4-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
640a297d41ac8b245a6790cae08dc41ddc143113db98e4169fa73d1a9767b176
BLAKE2b-256 checksum
How to use checksums
f7438486c8a48c49b35656d498b179e45755224962d57359b144a651cc3bf455
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for pytest-checkpoint 1.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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