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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytest_manifest-1.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pytest_manifest-1.0.tar.gz
Algorithm Hash digest
SHA256 2eb601b07d9f1138785382f06ab442af8de8b2fbf1b9f10edc18ae65f3fe78c3
MD5 4ac8e0ea8349a0eedcb49f9f2ea1f698
BLAKE2b-256 957c8099848c3e0f79a75d459fa2c6cede6e80c71aa27a91ef842e77a02e2100

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytest_manifest-1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pytest_manifest-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 48c5969d043e76bcdfb4bf22dc2b7b7b11373b4bc3bce0358143b23741941f89
MD5 ac7f4a730fe2410543f083c700fa6c52
BLAKE2b-256 77930f159e6a3261d1ac384a9bd93d78d663a39960a61d612186a5f21659182b

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