Name | taptaptap3 JSON |
Version |
3.1.0
JSON |
| download |
home_page | None |
Summary | Test Anything Protocol handling for cats |
upload_time | 2024-10-14 00:01:12 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.5 |
license | None |
keywords |
tap
test-anything-protocol
testing
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
Documentation
=============
:name: taptaptap
:author: Lukas Prokop
:date: Feb-Apr 2014, Jul 2018, Oct 2024
:license: BSD 3-clause
:version: 3.1.0
:issues: http://github.com/meisterluk/taptaptap3/issues
Test Anything Protocol handling for cat lovers \*rawwr*
.. contents:: Table of contents
``taptaptap3`` provides parsers, writers and APIs to handle the Test Anything Protocol (TAP). The implementation focuses on the most-current TAP version 13. TAP originates from the Perl community, but is a general format to document runs of testsuites. The reference to cats is just a pun for the noise of cats sneaking on floors and "3" is part of "<3", thus "lovers".
Compatibility
-------------
``taptaptap3`` is only supposed to be working with python 3.5 upwards.
It was written for python 2.7 as package `taptaptap <https://github.com/meisterluk/taptaptap>`_ and this implementation is the modern port to python3.
It has been tested with Python 3.12.6 on Arch Linux (Linux 6.10 on x86_64)
The File Format
---------------
A basic introduction is given by Wikipedia. The format was specified by the Perl community.
* `The Wikipedia article <https://en.wikipedia.org/wiki/Test_Anything_Protocol>`_
* `Original specification <http://web.archive.org/web/20120730055134/http://testanything.org/wiki/index.php/TAP_specification>`_
* `Test::Harness <https://metacpan.org/pod/release/PETDANCE/Test-Harness-2.64/lib/Test/Harness/TAP.pod#THE-TAP-FORMAT>`_
Testsuite & Examples
--------------------
``taptaptap3`` comes with a testsuite, which covers many special cases of the TAP format and tests the provided APIs. Please don't hesitate to report any issues_.
You can run the ``taptaptap3`` testcases yourself using::
./run.sh
in the tests directory. The testsuite also shows some API usage examples, but I want to provide some here. The procedural API is well-suited if you are in the python REPL::
from taptaptap3.proc import plan, ok, not_ok, out
plan(tests=10)
ok('Starting the robot')
not_ok('Starting the engine')
not_ok('Find the object', skip='Setup required')
not_ok('Terminate', skip='Setup required')
out()
The output looks like this::
1..10
ok - Starting the robot
not ok - Starting the engine
not ok - Find the object # SKIP Setup required
not ok - Terminate # SKIP Setup required
Be aware that the state is stored within the module. This is not what you want if you are outside the REPL. The ``TapWriter`` class is more convenient in this case::
import taptaptap3
writer = taptaptap3.TapWriter()
writer.plan(1, 3)
writer.ok('This testcase went fine')
writer.ok('And another one')
writer.ok('And also the last one')
If you like python's generators, you want to use ``SimpleTapCreator``::
@taptaptap3.SimpleTapCreator
def runTests():
yield True
yield True
yield False
print runTests()
Giving us::
1..3
ok
ok
not ok
Or take a look at the more sophisticated ``TapCreator``. If you are a real expert, you can use ``TapDocument`` directly, which covers all possibilities of TAP.
Command line tools
------------------
You can also invoke ``taptaptap3`` directly from the command line::
tapvalidate some_tap_file_to_validate.tap
This command will parse the file and write the file in a way how it was understood by the module. The exit code indicates its validity:
0
Everything fine.
1
The TAP file is missing some testcases or contains failed testcases.
2
A bailout was raised. So the testing environment crashed during the run.
Pickling
--------
All objects are pickable.
When to use ``taptaptap3``
--------------------------
Does ``taptaptap3`` suite your needs?
It does, if you are looking for a parser and validator for your TAP documents and you don't want to care about details and just need a gentle API.
best regards,
meisterluk
.. _issues: https://github.com/meisterluk/taptaptap
Raw data
{
"_id": null,
"home_page": null,
"name": "taptaptap3",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.5",
"maintainer_email": null,
"keywords": "TAP, test-anything-protocol, testing",
"author": null,
"author_email": "Lukas Prokop <admin@lukas-prokop.at>",
"download_url": "https://files.pythonhosted.org/packages/9d/6a/c1f1e1a94019069fd64569a8b3bd072657562d59391e86a22dc42dfb9459/taptaptap3-3.1.0.tar.gz",
"platform": null,
"description": "Documentation\n=============\n\n:name: taptaptap\n:author: Lukas Prokop\n:date: Feb-Apr 2014, Jul 2018, Oct 2024\n:license: BSD 3-clause\n:version: 3.1.0\n:issues: http://github.com/meisterluk/taptaptap3/issues\n\nTest Anything Protocol handling for cat lovers \\*rawwr*\n\n.. contents:: Table of contents\n\n``taptaptap3`` provides parsers, writers and APIs to handle the Test Anything Protocol (TAP). The implementation focuses on the most-current TAP version 13. TAP originates from the Perl community, but is a general format to document runs of testsuites. The reference to cats is just a pun for the noise of cats sneaking on floors and \"3\" is part of \"<3\", thus \"lovers\".\n\nCompatibility\n-------------\n\n``taptaptap3`` is only supposed to be working with python 3.5 upwards.\nIt was written for python 2.7 as package `taptaptap <https://github.com/meisterluk/taptaptap>`_ and this implementation is the modern port to python3.\nIt has been tested with Python 3.12.6 on Arch Linux (Linux 6.10 on x86_64) \n\nThe File Format\n---------------\n\nA basic introduction is given by Wikipedia. The format was specified by the Perl community.\n\n* `The Wikipedia article <https://en.wikipedia.org/wiki/Test_Anything_Protocol>`_\n* `Original specification <http://web.archive.org/web/20120730055134/http://testanything.org/wiki/index.php/TAP_specification>`_\n* `Test::Harness <https://metacpan.org/pod/release/PETDANCE/Test-Harness-2.64/lib/Test/Harness/TAP.pod#THE-TAP-FORMAT>`_\n\nTestsuite & Examples\n--------------------\n\n``taptaptap3`` comes with a testsuite, which covers many special cases of the TAP format and tests the provided APIs. Please don't hesitate to report any issues_.\n\nYou can run the ``taptaptap3`` testcases yourself using::\n\n ./run.sh\n\nin the tests directory. The testsuite also shows some API usage examples, but I want to provide some here. The procedural API is well-suited if you are in the python REPL::\n\n from taptaptap3.proc import plan, ok, not_ok, out\n plan(tests=10)\n ok('Starting the robot')\n not_ok('Starting the engine')\n not_ok('Find the object', skip='Setup required')\n not_ok('Terminate', skip='Setup required')\n\n out()\n\nThe output looks like this::\n\n 1..10\n ok - Starting the robot\n not ok - Starting the engine\n not ok - Find the object # SKIP Setup required\n not ok - Terminate # SKIP Setup required\n\nBe aware that the state is stored within the module. This is not what you want if you are outside the REPL. The ``TapWriter`` class is more convenient in this case::\n\n import taptaptap3\n\n writer = taptaptap3.TapWriter()\n writer.plan(1, 3)\n writer.ok('This testcase went fine')\n writer.ok('And another one')\n writer.ok('And also the last one')\n\nIf you like python's generators, you want to use ``SimpleTapCreator``::\n\n @taptaptap3.SimpleTapCreator\n def runTests():\n yield True\n yield True\n yield False\n\n print runTests()\n\nGiving us::\n\n 1..3\n ok\n ok\n not ok\n\nOr take a look at the more sophisticated ``TapCreator``. If you are a real expert, you can use ``TapDocument`` directly, which covers all possibilities of TAP.\n\nCommand line tools\n------------------\n\nYou can also invoke ``taptaptap3`` directly from the command line::\n\n tapvalidate some_tap_file_to_validate.tap\n\nThis command will parse the file and write the file in a way how it was understood by the module. The exit code indicates its validity:\n\n0\n Everything fine.\n1\n The TAP file is missing some testcases or contains failed testcases.\n2\n A bailout was raised. So the testing environment crashed during the run.\n\nPickling\n--------\n\nAll objects are pickable.\n\nWhen to use ``taptaptap3``\n--------------------------\n\nDoes ``taptaptap3`` suite your needs?\nIt does, if you are looking for a parser and validator for your TAP documents and you don't want to care about details and just need a gentle API.\n\nbest regards,\nmeisterluk\n\n.. _issues: https://github.com/meisterluk/taptaptap\n",
"bugtrack_url": null,
"license": null,
"summary": "Test Anything Protocol handling for cats",
"version": "3.1.0",
"project_urls": {
"Homepage": "http://lukas-prokop.at/proj/taptaptap/"
},
"split_keywords": [
"tap",
" test-anything-protocol",
" testing"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3eb72a93b2c1b1813a838bb03b8c81d3dbae5912d220e30fb472b8ad6d656c8b",
"md5": "43dfd2a208c63c3b68ed2000d02cc348",
"sha256": "51f8168fc8743fb75dfd9a11dc096eedc3d6f01a71b557fcc2c70975d6adb9a5"
},
"downloads": -1,
"filename": "taptaptap3-3.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "43dfd2a208c63c3b68ed2000d02cc348",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.5",
"size": 25001,
"upload_time": "2024-10-14T00:01:10",
"upload_time_iso_8601": "2024-10-14T00:01:10.668015Z",
"url": "https://files.pythonhosted.org/packages/3e/b7/2a93b2c1b1813a838bb03b8c81d3dbae5912d220e30fb472b8ad6d656c8b/taptaptap3-3.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9d6ac1f1e1a94019069fd64569a8b3bd072657562d59391e86a22dc42dfb9459",
"md5": "c1629c81dd7d592a72d7dc52f49f93b4",
"sha256": "3364822f7d664957f232b02e37cd4a18899d94b8166038fa0a118557262d73c0"
},
"downloads": -1,
"filename": "taptaptap3-3.1.0.tar.gz",
"has_sig": false,
"md5_digest": "c1629c81dd7d592a72d7dc52f49f93b4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 34550,
"upload_time": "2024-10-14T00:01:12",
"upload_time_iso_8601": "2024-10-14T00:01:12.709423Z",
"url": "https://files.pythonhosted.org/packages/9d/6a/c1f1e1a94019069fd64569a8b3bd072657562d59391e86a22dc42dfb9459/taptaptap3-3.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-14 00:01:12",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "taptaptap3"
}