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

Uploaded CPython 3.13

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

Uploaded CPython 3.12

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

Uploaded CPython 3.11

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

Uploaded CPython 3.10

File details

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

File metadata

  • Download URL: TAP-Producer-1.5.4.tar.gz
  • Upload date:
  • Size: 37.7 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.4.tar.gz
Algorithm Hash digest
SHA256 cc39f46b485e6f0e677420dcb9ee27ab009fc82e05f31e5668e5288962d60411
MD5 af5797920a8a9782c3e501061d9664ef
BLAKE2b-256 1c74c2f923d9512041b217b6384a6941cbe76a29b2a2de41437252f2010c1ee8

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: TAP_Producer-1.5.4-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.4-cp313-none-any.whl
Algorithm Hash digest
SHA256 f42b8ce6f7c69f39ed6133a23266d3986abb8015b43e8cf31f932189981aa017
MD5 103814ff63bcf2227638ec8c2f5b268d
BLAKE2b-256 966128411d2b8a91b9cc7bcb92acbb65a7444472b4448b8f8f000d68880c0756

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: TAP_Producer-1.5.4-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.4-cp312-none-any.whl
Algorithm Hash digest
SHA256 8d0986b8c29e5d5ec58025b8eee1701679fa36f5e529e07792f5a46759427c57
MD5 a58b5e1f9ccbca528741c189249c80b7
BLAKE2b-256 eaa10bb63c7d63af591f7c8be584eef09736e1e7a57cec1ae140311d831784d9

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: TAP_Producer-1.5.4-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.4-cp311-none-any.whl
Algorithm Hash digest
SHA256 ed8eb89c94719d0616bb6326b58d5d5beb35b747a740725af15cb1340d005b64
MD5 e0f8c0dabec84c881e6e13a1d3dcb10a
BLAKE2b-256 1272bf790cdf495466475150c6732d1f93c2c02a4b3a780f5728c43111bbe433

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: TAP_Producer-1.5.4-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.4-cp310-none-any.whl
Algorithm Hash digest
SHA256 eefdea45f2c908b983ca4d99b2b695343d86702feac5ab8b5a652d9b92fb6652
MD5 64b89801f60d3368088f3d201e233cb4
BLAKE2b-256 a99f74fb8b849ed10c9dc8acb42c72d9280f2b63678e868075fcf31a51c397a3

See more details on using hashes here.

Provenance

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