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.6.tar.gz (37.9 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.6-cp313-none-any.whl (28.4 kB view details)

Uploaded CPython 3.13

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

Uploaded CPython 3.12

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

Uploaded CPython 3.11

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

Uploaded CPython 3.10

File details

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

File metadata

  • Download URL: TAP-Producer-1.5.6.tar.gz
  • Upload date:
  • Size: 37.9 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.6.tar.gz
Algorithm Hash digest
SHA256 1a373587c6fbaa4172bc3dd98ddcc48080277931cd9a905ba01d1a4cdcf83d10
MD5 1606d0774f0704dfd1081e834aa6ee6f
BLAKE2b-256 56da9b2445214597ea924b7e863c7ebe24c45bbaed254a4c047771225229d6c8

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: TAP_Producer-1.5.6-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.6-cp313-none-any.whl
Algorithm Hash digest
SHA256 56d1eecf1812caf91f1d1515801cddfc7901d43e6ef4837d3d2cfedc1299e341
MD5 b8deb5aa43fe02dbee9f90c95faa3b62
BLAKE2b-256 31c6f2affb25bd9f872acd847f379f07accfaa9fa52aae57983a7aba25814ac9

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: TAP_Producer-1.5.6-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.6-cp312-none-any.whl
Algorithm Hash digest
SHA256 db214566faf3572a27bda2b0978fa307348f43cd136f9fb2e162db23f1829154
MD5 e99f5c345d101580ca713cc6097901f9
BLAKE2b-256 aa7cfb1b56002f8b5dc0c0e60531a403261c8f5120935da3327f634a7ce23397

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: TAP_Producer-1.5.6-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.6-cp311-none-any.whl
Algorithm Hash digest
SHA256 601ce4730525fd2a79857d12cc1c8c0073effdfac36fe907471fe84d4f4aa739
MD5 02f8920e50aa812c4e00f1027d09e1d7
BLAKE2b-256 e2cfc86555384729c52ed56001b5af1a08d6865cd63f04d93efdb1499a90bb41

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: TAP_Producer-1.5.6-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.6-cp310-none-any.whl
Algorithm Hash digest
SHA256 e55ec2f025d41654e93c221f38016b5a90be1fd483d0b2975de3ad5b8791c2ab
MD5 f1b1e7ff778b81810ff97946afaa8c7a
BLAKE2b-256 7585eb7e534f0a2f321dea6e5a47791bd77dfbcdf009ef4fb95c6b7a4b5755db

See more details on using hashes here.

Provenance

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