Skip to main content

Test Anything Protocol producer API for Python.

Project description

Producer for Test Anything Protocol output in Python.

from tap_producer import TAP
with TAP() as t:
  t.ok('passed')
  t.ok('also passed')

The TAP class automatically counts test points at call time for TAP version 12, 13, and 14.

from tap_producer import TAP
@TAP(plan=1, version=14)
def f() -> None:
   TAP.ok('reason')
f()

TAP can also be used as a function decorator.

from tap_producer import TAP
TAP.version(14)
TAP.ok('passed')
TAP.end()

The TAP class can also be used as a purely functional API. Normally TAP calls end() on its own.

from tap_producer import TAP
with TAP() as t:
   t.ok('passed').comment('debug information')
   if FAIL_CONDITION:
      t.not_ok('did not pass')
      t.bail_out()

TAP using version 12 supports plan, ok, not ok, diagnostic comment, and bail out functionality.

with TAP(version=13).subtest('subtest') as st:
   st.plan(count=1, skip_count=0).ok('ok', {'yaml-key': 'yaml-val'})

TAP version 13 supports the aforementioned as well as subtest context manager and YAML diagnostic output.

from tap_producer import TAP
with TAP() as t:
   with t.suppress():
      t.ok('passed but suppressed')
   with t.strict()
      t.not_ok('this is now a Python exception')

TAP-Producer also includes two decorators, a suppress context manager for suppressing TAP output and a strict context manager for raising not ok test cases to Python errors.

License

Licensed Apache-2.0 WITH LLVM-exception, no NOTICE file needed if you want to vendor TAP-Producer into your project, see LICENSE.txt for more information.

https://raw.githubusercontent.com/sigstore/community/main/artwork/badge/sigstore_codesigned_purple.png

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

TAP-Producer-1.5.7.tar.gz (38.1 kB view details)

Uploaded Source

Built Distributions

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

TAP_Producer-1.5.7-cp313-none-any.whl (28.4 kB view details)

Uploaded CPython 3.13

TAP_Producer-1.5.7-cp312-none-any.whl (28.3 kB view details)

Uploaded CPython 3.12

TAP_Producer-1.5.7-cp311-none-any.whl (29.1 kB view details)

Uploaded CPython 3.11

TAP_Producer-1.5.7-cp310-none-any.whl (23.4 kB view details)

Uploaded CPython 3.10

File details

Details for the file TAP-Producer-1.5.7.tar.gz.

File metadata

  • Download URL: TAP-Producer-1.5.7.tar.gz
  • Upload date:
  • Size: 38.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.8

File hashes

Hashes for TAP-Producer-1.5.7.tar.gz
Algorithm Hash digest
SHA256 34b6338261a6cfc3cc3ff32de855fc6ebc0276ad35c841d48cf2f46baa0eb733
MD5 ede27ba0163d11f9f4d06966e672f176
BLAKE2b-256 f392e5cc4dce04378c0ecad104e30edeb9a5004d1b8bb60ed08cd75f8a49f5bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for TAP-Producer-1.5.7.tar.gz:

Publisher: ozi.yml on OZI-Project/TAP-Producer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file TAP_Producer-1.5.7-cp313-none-any.whl.

File metadata

  • Download URL: TAP_Producer-1.5.7-cp313-none-any.whl
  • Upload date:
  • Size: 28.4 kB
  • Tags: CPython 3.13
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.8

File hashes

Hashes for TAP_Producer-1.5.7-cp313-none-any.whl
Algorithm Hash digest
SHA256 c37995610ac9c2b304bc54db529419732016ac055dfba25f559aef7f149a5344
MD5 a60f2add6321b13477fb514132a501de
BLAKE2b-256 3e2312999cf21d07a226e3edc8f0c6bf1646d3a97a3affa915fe7fc217eafd71

See more details on using hashes here.

Provenance

The following attestation bundles were made for TAP_Producer-1.5.7-cp313-none-any.whl:

Publisher: ozi.yml on OZI-Project/TAP-Producer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file TAP_Producer-1.5.7-cp312-none-any.whl.

File metadata

  • Download URL: TAP_Producer-1.5.7-cp312-none-any.whl
  • Upload date:
  • Size: 28.3 kB
  • Tags: CPython 3.12
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.8

File hashes

Hashes for TAP_Producer-1.5.7-cp312-none-any.whl
Algorithm Hash digest
SHA256 77d48d0ebf3a7de4cd81efdc47f0c408e286c1a182deea796e373f422a403f16
MD5 c865d26d5a2d74c34cbf04c346266eb3
BLAKE2b-256 2ccf13bb81806ad3fd0782e47d564b491647c3925f01b9a9afecfa2ab705c393

See more details on using hashes here.

Provenance

The following attestation bundles were made for TAP_Producer-1.5.7-cp312-none-any.whl:

Publisher: ozi.yml on OZI-Project/TAP-Producer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file TAP_Producer-1.5.7-cp311-none-any.whl.

File metadata

  • Download URL: TAP_Producer-1.5.7-cp311-none-any.whl
  • Upload date:
  • Size: 29.1 kB
  • Tags: CPython 3.11
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.8

File hashes

Hashes for TAP_Producer-1.5.7-cp311-none-any.whl
Algorithm Hash digest
SHA256 a34cbc20e080fb8613c1bc7eec097e4a07be9ebfb5ada354b6af7a74df370e00
MD5 1bf8cc3bf0f5ba7f7da7bbdeeca03f7d
BLAKE2b-256 6494345c7b8399e6f455306d7f31583c643dd3cde40cd5121441c5c626e8858f

See more details on using hashes here.

Provenance

The following attestation bundles were made for TAP_Producer-1.5.7-cp311-none-any.whl:

Publisher: ozi.yml on OZI-Project/TAP-Producer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file TAP_Producer-1.5.7-cp310-none-any.whl.

File metadata

  • Download URL: TAP_Producer-1.5.7-cp310-none-any.whl
  • Upload date:
  • Size: 23.4 kB
  • Tags: CPython 3.10
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.8

File hashes

Hashes for TAP_Producer-1.5.7-cp310-none-any.whl
Algorithm Hash digest
SHA256 1a048bab434079eaf2cf3db45b166fe37cca8e492d05969069c89c983df19794
MD5 5f6c4c4bf1db46eefbfdeb94748af0df
BLAKE2b-256 9f2427b80301aa282160458e35ee80999bcf8ce4d7b50d379ae4567bdc67f9d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for TAP_Producer-1.5.7-cp310-none-any.whl:

Publisher: ozi.yml on OZI-Project/TAP-Producer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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