Skip to main content

Pytest decorators for the Klab Pytest Toolkit

Project description

Klab Pytest Toolkit - Decorators

Custom pytest decorators for marking and annotating tests.

At the moment the package provides the following decorator:

  • @requirement(id: str): Marks a test with a requirement ID for traceability. The ID is added to the junit xml output.

Installation

pip install klab_pytest_toolkit_decorators

Usage

Requirement Decorator

Mark tests with requirement IDs for traceability:

from klab_pytest_toolkit_decorators import requirement

@requirement("REQ-001")
def test_something():
    assert True

@requirement("REQ-002")
async def test_async_something():
    assert True

The decorator works with both synchronous and asynchronous test functions. The requirement IDs are added to the junit xml output.

License

MIT

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

klab_pytest_toolkit_decorators-1.0.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file klab_pytest_toolkit_decorators-1.0.0.tar.gz.

File metadata

  • Download URL: klab_pytest_toolkit_decorators-1.0.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for klab_pytest_toolkit_decorators-1.0.0.tar.gz
Algorithm Hash digest
SHA256 31858366a58c29c9be453c533487b6daf44ac3bd06e2696ae311e1d581215ff0
MD5 f63453f71fe2cf06ce4a1a5c20d4c00c
BLAKE2b-256 a42e37ef13eb12e0bb3fadda070d5d9c865bb573ccaff273a81d5ab171a0cc1d

See more details on using hashes here.

File details

Details for the file klab_pytest_toolkit_decorators-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: klab_pytest_toolkit_decorators-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for klab_pytest_toolkit_decorators-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33445c98d9e38f546d4339adf1eb11cfd5ee85eb854ba0b06aab3c98dc20370a
MD5 93f138045359411b4379839359c5e829
BLAKE2b-256 38d15f9ffa84879e0286e359384cbb3d0a1b31bfa384bb912fe4b2db056e3532

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