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.3.tar.gz (8.7 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.3-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pytest_manifest-0.1.3.tar.gz
Algorithm Hash digest
SHA256 0590d8610cde9bbea4df49a93dcb0f38c4b2c7b7fcb314ff297c6e2766103994
MD5 f55ad9de92d4778e4a7ac7bdb9bce07e
BLAKE2b-256 2c4fdea7dbfbf45e969862b96163108e2c7cd9f8d62afd5d16dd4af20c22b66f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pytest_manifest-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ebecc7de953503997aec472fc2560e44376abc75a9676206d8db34b27c85d09f
MD5 3d87c175b2d83c4be585c976de3f6682
BLAKE2b-256 11dc8582ff2fe84ba95391b74c6ebf35a3b3877096dd4a8e4c145194bb6c384b

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