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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pytest_manifest-0.1.tar.gz
Algorithm Hash digest
SHA256 4a2695153eb068c19c8cc406c7229f486615d8888666e65794ee401129266279
MD5 99c47d6ad62ac50c266ec43b22a2c2f0
BLAKE2b-256 1fa991b80fd45195c43df51e3c42163321cb485652a7a81cbb4dfd336b119689

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytest_manifest-0.1-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.13.2

File hashes

Hashes for pytest_manifest-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 be63aa6e777ebb40f479e4b896c322c567cafa3cc39fe2d04f208fd1627b2ac5
MD5 4cfb785fea24f43af8b225997d774ee8
BLAKE2b-256 29e0817bc9b206c08775ff08e019fbe4f7cf428131d5761565331835d33ac7ab

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