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.2.tar.gz (37.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.2-cp313-none-any.whl (28.3 kB view details)

Uploaded CPython 3.13

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

Uploaded CPython 3.12

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

Uploaded CPython 3.11

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

Uploaded CPython 3.10

File details

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

File metadata

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

File hashes

Hashes for TAP-Producer-1.5.2.tar.gz
Algorithm Hash digest
SHA256 ef7013e70e87a27c02e6edcdbe9067cc64a5231f9cefaf1f07240f49be530256
MD5 dddcac820835e12fc90dbf5b4db2ae60
BLAKE2b-256 448c919aa5b01f8f36f5ac736acb32cd4e68ec6c920504de6330f96d9abc8d94

See more details on using hashes here.

Provenance

The following attestation bundles were made for TAP-Producer-1.5.2.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.2-cp313-none-any.whl.

File metadata

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

File hashes

Hashes for TAP_Producer-1.5.2-cp313-none-any.whl
Algorithm Hash digest
SHA256 fe2a21d929884f9478d8f02a4d8ca09d722b2357f9529f4894fc35e4d3298bc4
MD5 4047e91f4a699d4fc7f3d6007e5d906a
BLAKE2b-256 ff61397bc2ebcc741ae6e29911bf8b0a73203564588f30ee2a4af00324210332

See more details on using hashes here.

Provenance

The following attestation bundles were made for TAP_Producer-1.5.2-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.2-cp312-none-any.whl.

File metadata

  • Download URL: TAP_Producer-1.5.2-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.7

File hashes

Hashes for TAP_Producer-1.5.2-cp312-none-any.whl
Algorithm Hash digest
SHA256 199c71fda77de1b0848f316faa79260bcfb2ec81fe285ce2b79b5b56f334d3f5
MD5 217359dd4b53aba41879f7b64b15dafb
BLAKE2b-256 3bf9af23b81aa74433ed0d3eaaa06b735d64901f81379fe8fe5de33a11fc0baa

See more details on using hashes here.

Provenance

The following attestation bundles were made for TAP_Producer-1.5.2-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.2-cp311-none-any.whl.

File metadata

  • Download URL: TAP_Producer-1.5.2-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.7

File hashes

Hashes for TAP_Producer-1.5.2-cp311-none-any.whl
Algorithm Hash digest
SHA256 342a3e0a97bfb278d63bc350b1d3c1a1cb9462f3c97b96fdc608a5a1774c16d8
MD5 6ae895c5d13495979877af829423480a
BLAKE2b-256 889f825b9de2850d964fb9bfda4851f5d1089bae8969aebe46c2de85759bd352

See more details on using hashes here.

Provenance

The following attestation bundles were made for TAP_Producer-1.5.2-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.2-cp310-none-any.whl.

File metadata

  • Download URL: TAP_Producer-1.5.2-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.7

File hashes

Hashes for TAP_Producer-1.5.2-cp310-none-any.whl
Algorithm Hash digest
SHA256 db8e35b05e9cf052ed7648357d1ec347de0ec133356b7099adfa75e4d6903eeb
MD5 f795caf4a81116d28d4798c3af2087fa
BLAKE2b-256 7264171488d2f102979e0ea6a4e04b45ddb3e187e7a213656d285262f38ea98b

See more details on using hashes here.

Provenance

The following attestation bundles were made for TAP_Producer-1.5.2-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