.. OZI
Classifier: License-Expression :: Apache-2.0 WITH LLVM-exception
Classifier: License-File :: LICENSE.txt
..
Part of TAP-Producer.
See LICENSE.txt in the project root for details.
============
TAP-Producer
============
Producer for Test Anything Protocol output in Python.
.. code-block::
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.
.. code-block::
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.
.. code-block::
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.
.. code-block::
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.
.. code-block::
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.
.. code-block::
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.
.. image:: https://raw.githubusercontent.com/sigstore/community/main/artwork/badge/sigstore_codesigned_purple.png
:align: right
:height: 140
:target: https://www.sigstore.dev/
Raw data
{
"_id": null,
"home_page": "https://rjdbcm.github.io/rjdbcm/",
"name": "TAP-Producer",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.14,>=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Eden Ross Duff MSc",
"author_email": "help@oziproject.dev",
"download_url": "https://files.pythonhosted.org/packages/98/83/e905d146a201bd5ce1588bef9f8ac86f9226d4d0afef53b25475aa895dec/TAP-Producer-1.5.14.tar.gz",
"platform": null,
"description": "\n\n.. OZI\n Classifier: License-Expression :: Apache-2.0 WITH LLVM-exception\n Classifier: License-File :: LICENSE.txt\n\n..\n Part of TAP-Producer.\n See LICENSE.txt in the project root for details.\n\n============\nTAP-Producer\n============\n\nProducer for Test Anything Protocol output in Python.\n\n.. code-block::\n\n from tap_producer import TAP\n with TAP() as t:\n t.ok('passed')\n t.ok('also passed')\n \nThe TAP class automatically counts test points at call time for TAP version 12, 13, and 14.\n\n.. code-block::\n\n from tap_producer import TAP\n @TAP(plan=1, version=14)\n def f() -> None:\n TAP.ok('reason')\n f()\n\nTAP can also be used as a function decorator.\n\n.. code-block::\n\n from tap_producer import TAP\n TAP.version(14)\n TAP.ok('passed')\n TAP.end()\n\nThe TAP class can also be used as a purely functional API. Normally TAP calls ``end()`` on its own. \n\n.. code-block::\n\n from tap_producer import TAP\n with TAP() as t:\n t.ok('passed').comment('debug information')\n if FAIL_CONDITION:\n t.not_ok('did not pass')\n t.bail_out()\n\nTAP using version 12 supports plan, ok, not ok, diagnostic comment, and bail out\nfunctionality.\n\n.. code-block::\n\n with TAP(version=13).subtest('subtest') as st:\n st.plan(count=1, skip_count=0).ok('ok', {'yaml-key': 'yaml-val'})\n\nTAP version 13 supports the aforementioned as well as subtest context manager\nand YAML diagnostic output.\n\n.. code-block::\n\n from tap_producer import TAP\n with TAP() as t:\n with t.suppress():\n t.ok('passed but suppressed')\n with t.strict()\n t.not_ok('this is now a Python exception')\n\nTAP-Producer also includes two decorators, a suppress context manager for\nsuppressing TAP output and a strict context manager for raising not ok test\ncases to Python errors.\n\nLicense\n-------\n\nLicensed Apache-2.0 WITH LLVM-exception, no NOTICE file needed if you want\nto vendor TAP-Producer into your project, see LICENSE.txt for more information.\n\n.. image:: https://raw.githubusercontent.com/sigstore/community/main/artwork/badge/sigstore_codesigned_purple.png\n :align: right\n :height: 140\n :target: https://www.sigstore.dev/\n",
"bugtrack_url": null,
"license": "Apache-2.0 WITH LLVM-exception",
"summary": "Test Anything Protocol producer API for Python.",
"version": "1.5.14",
"project_urls": {
"Documentation": "https://tap-producer.readthedocs.io/en/latest/",
"Download": "https://github.com/OZI-Project/TAP-Producer/archive/refs/tags/1.5.14.tar.gz",
"Homepage": "https://rjdbcm.github.io/rjdbcm/",
"Source": "https://github.com/OZI-Project/TAP-Producer"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "cd0b2e0dd999398af105205af379632bedfeac045fe5ae6b3bda0ce0ca19f5da",
"md5": "dd84c1785a4f2f3d06df8b3c33eeff29",
"sha256": "78034388bf5fdb79d9fe4d6c5bd7ae1c32f04cb4f89bee4af50ed0b25bb6876e"
},
"downloads": -1,
"filename": "TAP_Producer-1.5.14-cp311-none-any.whl",
"has_sig": false,
"md5_digest": "dd84c1785a4f2f3d06df8b3c33eeff29",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": "<3.14,>=3.10",
"size": 29115,
"upload_time": "2025-03-22T07:04:57",
"upload_time_iso_8601": "2025-03-22T07:04:57.508084Z",
"url": "https://files.pythonhosted.org/packages/cd/0b/2e0dd999398af105205af379632bedfeac045fe5ae6b3bda0ce0ca19f5da/TAP_Producer-1.5.14-cp311-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "fb394f351f180e8daec0f868588f155e02698d08eda2b6b53ebd59bca6b3d036",
"md5": "b36737ee871f128530bb60bacfed5afe",
"sha256": "4221dff6f637af64458de2cdc9d897f069efd4155dcfd049d0711b54b6e963f6"
},
"downloads": -1,
"filename": "TAP_Producer-1.5.14-cp312-none-any.whl",
"has_sig": false,
"md5_digest": "b36737ee871f128530bb60bacfed5afe",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": "<3.14,>=3.10",
"size": 28460,
"upload_time": "2025-03-22T07:04:59",
"upload_time_iso_8601": "2025-03-22T07:04:59.290767Z",
"url": "https://files.pythonhosted.org/packages/fb/39/4f351f180e8daec0f868588f155e02698d08eda2b6b53ebd59bca6b3d036/TAP_Producer-1.5.14-cp312-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "8ad41af1ee8ad58a2401468d02e182c3ba2d826ec94320b359ea1d9921e5d8f7",
"md5": "976f7f16e53304c3ca5757f706c433a4",
"sha256": "14a3e750fffe45141d9f4e5b97696e3449c8efa4baaf27950d88d46e79d1bfdc"
},
"downloads": -1,
"filename": "TAP_Producer-1.5.14-cp313-none-any.whl",
"has_sig": false,
"md5_digest": "976f7f16e53304c3ca5757f706c433a4",
"packagetype": "bdist_wheel",
"python_version": "cp313",
"requires_python": "<3.14,>=3.10",
"size": 28383,
"upload_time": "2025-03-22T07:05:00",
"upload_time_iso_8601": "2025-03-22T07:05:00.488661Z",
"url": "https://files.pythonhosted.org/packages/8a/d4/1af1ee8ad58a2401468d02e182c3ba2d826ec94320b359ea1d9921e5d8f7/TAP_Producer-1.5.14-cp313-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "9883e905d146a201bd5ce1588bef9f8ac86f9226d4d0afef53b25475aa895dec",
"md5": "107783017f8eb4cc8d0271e2bcfafc1b",
"sha256": "b46bd7971a77d78e33a12788a2e378ededf579dc9432907a0cf2d7b209b89a27"
},
"downloads": -1,
"filename": "TAP-Producer-1.5.14.tar.gz",
"has_sig": false,
"md5_digest": "107783017f8eb4cc8d0271e2bcfafc1b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.14,>=3.10",
"size": 71144,
"upload_time": "2025-03-22T07:05:01",
"upload_time_iso_8601": "2025-03-22T07:05:01.952369Z",
"url": "https://files.pythonhosted.org/packages/98/83/e905d146a201bd5ce1588bef9f8ac86f9226d4d0afef53b25475aa895dec/TAP-Producer-1.5.14.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-03-22 07:05:01",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "OZI-Project",
"github_project": "TAP-Producer",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "tap-producer"
}