TAP-Producer


NameTAP-Producer JSON
Version 1.5.7 PyPI version JSON
download
home_pagehttps://rjdbcm.github.io/rjdbcm/
SummaryTest Anything Protocol producer API for Python.
upload_time2024-12-10 02:21:47
maintainerNone
docs_urlNone
authorEden Ross Duff MSc
requires_python<3.14,>=3.10
licenseApache-2.0 WITH LLVM-exception
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
.. 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/f3/92/e5cc4dce04378c0ecad104e30edeb9a5004d1b8bb60ed08cd75f8a49f5bd/TAP-Producer-1.5.7.tar.gz",
    "platform": null,
    "description": "\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.7",
    "project_urls": {
        "Documentation": "https://tap-producer.readthedocs.io/en/latest/",
        "Download": "https://github.com/OZI-Project/TAP-Producer/archive/refs/tags/1.5.7.tar.gz",
        "Homepage": "https://rjdbcm.github.io/rjdbcm/",
        "Source": "https://github.com/OZI-Project/TAP-Producer"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9f2427b80301aa282160458e35ee80999bcf8ce4d7b50d379ae4567bdc67f9d7",
                "md5": "5f6c4c4bf1db46eefbfdeb94748af0df",
                "sha256": "1a048bab434079eaf2cf3db45b166fe37cca8e492d05969069c89c983df19794"
            },
            "downloads": -1,
            "filename": "TAP_Producer-1.5.7-cp310-none-any.whl",
            "has_sig": false,
            "md5_digest": "5f6c4c4bf1db46eefbfdeb94748af0df",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": "<3.14,>=3.10",
            "size": 23417,
            "upload_time": "2024-12-10T02:21:35",
            "upload_time_iso_8601": "2024-12-10T02:21:35.267896Z",
            "url": "https://files.pythonhosted.org/packages/9f/24/27b80301aa282160458e35ee80999bcf8ce4d7b50d379ae4567bdc67f9d7/TAP_Producer-1.5.7-cp310-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6494345c7b8399e6f455306d7f31583c643dd3cde40cd5121441c5c626e8858f",
                "md5": "1bf8cc3bf0f5ba7f7da7bbdeeca03f7d",
                "sha256": "a34cbc20e080fb8613c1bc7eec097e4a07be9ebfb5ada354b6af7a74df370e00"
            },
            "downloads": -1,
            "filename": "TAP_Producer-1.5.7-cp311-none-any.whl",
            "has_sig": false,
            "md5_digest": "1bf8cc3bf0f5ba7f7da7bbdeeca03f7d",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": "<3.14,>=3.10",
            "size": 29098,
            "upload_time": "2024-12-10T02:21:39",
            "upload_time_iso_8601": "2024-12-10T02:21:39.752765Z",
            "url": "https://files.pythonhosted.org/packages/64/94/345c7b8399e6f455306d7f31583c643dd3cde40cd5121441c5c626e8858f/TAP_Producer-1.5.7-cp311-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2ccf13bb81806ad3fd0782e47d564b491647c3925f01b9a9afecfa2ab705c393",
                "md5": "c865d26d5a2d74c34cbf04c346266eb3",
                "sha256": "77d48d0ebf3a7de4cd81efdc47f0c408e286c1a182deea796e373f422a403f16"
            },
            "downloads": -1,
            "filename": "TAP_Producer-1.5.7-cp312-none-any.whl",
            "has_sig": false,
            "md5_digest": "c865d26d5a2d74c34cbf04c346266eb3",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": "<3.14,>=3.10",
            "size": 28313,
            "upload_time": "2024-12-10T02:21:42",
            "upload_time_iso_8601": "2024-12-10T02:21:42.257862Z",
            "url": "https://files.pythonhosted.org/packages/2c/cf/13bb81806ad3fd0782e47d564b491647c3925f01b9a9afecfa2ab705c393/TAP_Producer-1.5.7-cp312-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3e2312999cf21d07a226e3edc8f0c6bf1646d3a97a3affa915fe7fc217eafd71",
                "md5": "a60f2add6321b13477fb514132a501de",
                "sha256": "c37995610ac9c2b304bc54db529419732016ac055dfba25f559aef7f149a5344"
            },
            "downloads": -1,
            "filename": "TAP_Producer-1.5.7-cp313-none-any.whl",
            "has_sig": false,
            "md5_digest": "a60f2add6321b13477fb514132a501de",
            "packagetype": "bdist_wheel",
            "python_version": "cp313",
            "requires_python": "<3.14,>=3.10",
            "size": 28365,
            "upload_time": "2024-12-10T02:21:44",
            "upload_time_iso_8601": "2024-12-10T02:21:44.594132Z",
            "url": "https://files.pythonhosted.org/packages/3e/23/12999cf21d07a226e3edc8f0c6bf1646d3a97a3affa915fe7fc217eafd71/TAP_Producer-1.5.7-cp313-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f392e5cc4dce04378c0ecad104e30edeb9a5004d1b8bb60ed08cd75f8a49f5bd",
                "md5": "ede27ba0163d11f9f4d06966e672f176",
                "sha256": "34b6338261a6cfc3cc3ff32de855fc6ebc0276ad35c841d48cf2f46baa0eb733"
            },
            "downloads": -1,
            "filename": "TAP-Producer-1.5.7.tar.gz",
            "has_sig": false,
            "md5_digest": "ede27ba0163d11f9f4d06966e672f176",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.14,>=3.10",
            "size": 38090,
            "upload_time": "2024-12-10T02:21:47",
            "upload_time_iso_8601": "2024-12-10T02:21:47.060443Z",
            "url": "https://files.pythonhosted.org/packages/f3/92/e5cc4dce04378c0ecad104e30edeb9a5004d1b8bb60ed08cd75f8a49f5bd/TAP-Producer-1.5.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-10 02:21:47",
    "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"
}
        
Elapsed time: 1.05554s