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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytest_manifest-1.0rc0.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.12

File hashes

Hashes for pytest_manifest-1.0rc0.tar.gz
Algorithm Hash digest
SHA256 c5614385b1240535896ad147b8e174597e1195b40d7e995c6343fa662bbe49d8
MD5 1d0ae6eb1cf1a214962ab175a49a0591
BLAKE2b-256 2a98176aa3b7adb1e3c512605fa37890c382cfd1dc9e14f0f7365fe8e614b2f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pytest_manifest-1.0rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 1df14a90370d8d81dc68b4839614a24f680d1ee48b2599ac9aee9aa7982e2d20
MD5 4b1f942c5835a3796b81ce4edcea8623
BLAKE2b-256 fc2e1f9aba434c596f55fe3edc3f562c4dd8ccbcab2fd653174ccbf76eef8258

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