Skip to main content

PyTest plugin for recording and asserting against a manifest file

Project description

pytest-manifest

pytest-manifest is a plugin for the pytest testing framework. Its purpose is to provide an easy way to capture and assert test outputs.

Installation

To install pytest-manifest, use pip:

pip install pytest-manifest

Usage

pytest-manifest exposes a manifest fixture that loads the expected test result from a YAML file and can be asserted against a test output:

def test(manifest):
    assert manifest == "actual"

...or load a subset of the file using a key:

    assert manifest["key"] == "actual"

The manifest file can optionally be overwritten with the actual test result on failed assertions by passing the --overwrite-manifest/-O flag to pytest when executing tests:

pytest --overwrite-manifest test.py

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_manifest-0.1.2.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_manifest-0.1.2-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file pytest_manifest-0.1.2.tar.gz.

File metadata

  • Download URL: pytest_manifest-0.1.2.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.6

File hashes

Hashes for pytest_manifest-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d169e2fca33534512409b6390cc7fabb852972392c61d1739a7637ea87856b2c
MD5 4492c85ac7f53153fff71da13b5a4719
BLAKE2b-256 584001805ee40a5aa34b1dd00e7485f318136e4d2f726ea54328677882836d31

See more details on using hashes here.

File details

Details for the file pytest_manifest-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_manifest-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d1e50f17723f38947439ac68fa19b92808e46587435a5da20cd2a1f8cd43259e
MD5 1f0cf691ec11442e1b7926d9b1c36ecd
BLAKE2b-256 939de28220c2a9d09b25ac0600d0a6d0306566fdf2f76cfb0d6bcd7140c45f03

See more details on using hashes here.

Supported by

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