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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file TAP-Producer-1.4.2.tar.gz
.
File metadata
- Download URL: TAP-Producer-1.4.2.tar.gz
- Upload date:
- Size: 32.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9ce6c122db3ecfaf3cab50c9378027f7b47ad0c3f1755421e34e2316257965e |
|
MD5 | 2b0c75d70a6970ac72a1f5323e205a56 |
|
BLAKE2b-256 | a6602bbf9b0906d37f9da25cf319cdd633b8bbcb066bf5b6b858388f91d178ee |
Provenance
The following attestation bundles were made for TAP-Producer-1.4.2.tar.gz
:
Publisher:
ozi.yml
on OZI-Project/TAP-Producer
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
tap_producer-1.4.2.tar.gz
- Subject digest:
b9ce6c122db3ecfaf3cab50c9378027f7b47ad0c3f1755421e34e2316257965e
- Sigstore transparency entry: 150070511
- Sigstore integration time:
- Predicate type:
File details
Details for the file TAP_Producer-1.4.2-cp313-none-any.whl
.
File metadata
- Download URL: TAP_Producer-1.4.2-cp313-none-any.whl
- Upload date:
- Size: 26.2 kB
- Tags: CPython 3.13
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b54ae0e2d509d9e50a281705549bfcf1513ce984fa62d8d1a4369fc63f88a472 |
|
MD5 | 8a78cd99aacb225e23dac18467dd815a |
|
BLAKE2b-256 | f00258b0153ce7c6bc5da16534a0dffe4519d993019dfdedffcfaf83857978ce |
Provenance
The following attestation bundles were made for TAP_Producer-1.4.2-cp313-none-any.whl
:
Publisher:
ozi.yml
on OZI-Project/TAP-Producer
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
tap_producer-1.4.2-cp313-none-any.whl
- Subject digest:
b54ae0e2d509d9e50a281705549bfcf1513ce984fa62d8d1a4369fc63f88a472
- Sigstore transparency entry: 150070519
- Sigstore integration time:
- Predicate type:
File details
Details for the file TAP_Producer-1.4.2-cp312-none-any.whl
.
File metadata
- Download URL: TAP_Producer-1.4.2-cp312-none-any.whl
- Upload date:
- Size: 26.1 kB
- Tags: CPython 3.12
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a77277e0aff80506d92f72f27884ca7dc9f5fa510f71e3fa22a492d1a37a7ed2 |
|
MD5 | 2d098211d0c1fac6df9d1f45a1e70e33 |
|
BLAKE2b-256 | b4d4fac7a3a8a4f9db5617c546174c361e105fd76028a22ebf7cf5bdee4c0925 |
Provenance
The following attestation bundles were made for TAP_Producer-1.4.2-cp312-none-any.whl
:
Publisher:
ozi.yml
on OZI-Project/TAP-Producer
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
tap_producer-1.4.2-cp312-none-any.whl
- Subject digest:
a77277e0aff80506d92f72f27884ca7dc9f5fa510f71e3fa22a492d1a37a7ed2
- Sigstore transparency entry: 150070515
- Sigstore integration time:
- Predicate type:
File details
Details for the file TAP_Producer-1.4.2-cp311-none-any.whl
.
File metadata
- Download URL: TAP_Producer-1.4.2-cp311-none-any.whl
- Upload date:
- Size: 26.8 kB
- Tags: CPython 3.11
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d210d5b59aa19c14917efac534bdd4c90a66295bdc69cd1a2391102f8487d067 |
|
MD5 | 1e0bc2d6a0d02fe6355238bb145359bf |
|
BLAKE2b-256 | 5d92b8d4dd2903852ab3704ed338c0a8786cb25007466f77f89ec957e6780fa9 |
Provenance
The following attestation bundles were made for TAP_Producer-1.4.2-cp311-none-any.whl
:
Publisher:
ozi.yml
on OZI-Project/TAP-Producer
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
tap_producer-1.4.2-cp311-none-any.whl
- Subject digest:
d210d5b59aa19c14917efac534bdd4c90a66295bdc69cd1a2391102f8487d067
- Sigstore transparency entry: 150070520
- Sigstore integration time:
- Predicate type:
File details
Details for the file TAP_Producer-1.4.2-cp310-none-any.whl
.
File metadata
- Download URL: TAP_Producer-1.4.2-cp310-none-any.whl
- Upload date:
- Size: 21.3 kB
- Tags: CPython 3.10
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 789e71e799963142d5474b9016a0d45b53b9ff1d69f6e5c49343d736cd66e644 |
|
MD5 | 4dec2983b3c7fbc76abd57bea17f0bcd |
|
BLAKE2b-256 | 3d801dfcd284e22eefb10f27d8b52a5e9833e6f75693fc96e3ac9d338459b832 |
Provenance
The following attestation bundles were made for TAP_Producer-1.4.2-cp310-none-any.whl
:
Publisher:
ozi.yml
on OZI-Project/TAP-Producer
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
tap_producer-1.4.2-cp310-none-any.whl
- Subject digest:
789e71e799963142d5474b9016a0d45b53b9ff1d69f6e5c49343d736cd66e644
- Sigstore transparency entry: 150070514
- Sigstore integration time:
- Predicate type: