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.1.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.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytest_manifest-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 74b415dc2ae2ba4a0352c0b75d0057d8148cb02d4175c93ebea96438c8315248
MD5 f9c95b0395ecd500e561f98424bf6250
BLAKE2b-256 5de0b5b628f384aed82af8d1d54109dea78087812f5b6251b1fc163285aba610

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pytest_manifest-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 57e38588fec2fc00ac31e5c0e3c0cdda781278069af3ab8ec884157dda38c0d7
MD5 7ca69d894cbbff289f1bd6907b8dbafd
BLAKE2b-256 2f368e8bb99f6c2f2ac58cb16fa61a51a3d78f1157dd4bc956db49c11a4c7c2e

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