Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Documentation

name:

taptaptap

author:

Lukas Prokop

date:

Feb-Apr 2014

license:

BSD 3-clause

version:

1.0.1-stable

issues:

http://github.com/meisterluk/taptaptap/issues

Test Anything Protocol handling for cats *rawwr*

taptaptap 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.

Compatibility

taptaptap is only supposed to be working with python 2.7 (due to with statements and argparse). It has been tested with Linux 3.8 x86_64. A version for python 3.x is (not yet?) available. It fully supports unicode.

The File Format

A basic introduction is given by Wikipedia. The format was specified by the Perl community.

Testsuite & Examples

taptaptap 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 taptaptap 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 taptaptap.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 taptaptap

writer = taptaptap.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:

@taptaptap.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 taptaptap directly from the command line:

python -m taptaptap.__main__ 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 taptaptap

Does taptaptap 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

Metadata

Release files for taptaptap 1.0.0-stable

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for taptaptap 1.0.0-stable
File Size Uploaded Provenance Actions
taptaptap-1.0.0-stable.tar.gz 18.8 kB Without provenance Details for taptaptap-1.0.0-stable.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for taptaptap 1.0.0-stable
File Interpreter ABI Platform Actions
taptaptap-1.0.0-stable.linux-x86_64.tar.gz Details for taptaptap-1.0.0-stable.linux-x86_64.tar.gz

Total release size: 61.0 kB

Release files / taptaptap-1.0.0-stable.tar.gz

Download URL taptaptap-1.0.0-stable.tar.gz
Size 18.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ab6bc0d771ac3896c589fe5e51ac819fc5671893939b7650ef4426a835413b41
BLAKE2b-256 checksum
How to use checksums
15ad0ac3d7a3d24a5486c28fede599adf1852b9aa5be4e6b6a4977283011de54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / taptaptap-1.0.0-stable.linux-x86_64.tar.gz

Download URL taptaptap-1.0.0-stable.linux-x86_64.tar.gz
Size 42.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ceeb40e1fd62ce9b3c4b6a702938ea13962117047dd744323bd9ed07800e4658
BLAKE2b-256 checksum
How to use checksums
bd6281fbcb7eb1400f95362db1621dfe2b5800484c9f9b4655f35f2c54e8510f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for taptaptap 1.0.0-stable

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page